update common config interface
This commit is contained in:
parent
ac3732d318
commit
05e6b5a847
|
@ -1,5 +1,9 @@
|
||||||
package cnf
|
package cnf
|
||||||
|
|
||||||
|
import (
|
||||||
|
"io"
|
||||||
|
)
|
||||||
|
|
||||||
// Field generic representation (root, branch or leaf)
|
// Field generic representation (root, branch or leaf)
|
||||||
type Field struct {
|
type Field struct {
|
||||||
// Label of the current field
|
// Label of the current field
|
||||||
|
@ -12,6 +16,9 @@ type Field struct {
|
||||||
|
|
||||||
// ConfigurationFormat is the common interface for all configuration parser
|
// ConfigurationFormat is the common interface for all configuration parser
|
||||||
type ConfigurationFormat interface {
|
type ConfigurationFormat interface {
|
||||||
|
// Parse the given file
|
||||||
|
Parse(io.Reader) error
|
||||||
|
|
||||||
// Get the value of a field if it exists
|
// Get the value of a field if it exists
|
||||||
Get(string) (string, bool)
|
Get(string) (string, bool)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue