nix-amer/cnf/common.go

21 lines
499 B
Go
Raw Normal View History

package cnf
// Field generic representation (root, branch or leaf)
type Field struct {
// Label of the current field
Label string
// Value of the current field
Value string
// Children of the current field or NIL if none
Children []Field
}
// ConfigurationFormat is the common interface for all configuration parser
type ConfigurationFormat interface {
// 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
}