nix-amer/internal/cnf/common.go

23 lines
478 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 {
// ReadFrom the given file
// implements io.ReaderFrom
ReadFrom(io.Reader) (int64, error)
// WriteTo a file the updated content
// implements io.WriterTo
WriteTo(io.Writer) (int64, 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
}