nix-amer/internal/cnf/common.go

21 lines
394 B
Go
Raw Normal View History

package cnf
2018-11-07 13:03:30 +00:00
import (
"io"
)
// ConfigurationFormat is the common interface for all configuration parser
type ConfigurationFormat interface {
// Read the given file
Read(io.Reader) error
// Write the given update to the file
Write(io.Writer) error
2018-11-07 13:03:30 +00:00
// Get the value of a field if it exists
Get(string) (string, bool)
// Set the value of a field if exists
Set(string, string) bool
}