update common config interface

This commit is contained in:
xdrm-brackets 2018-11-07 14:03:30 +01:00
parent ac3732d318
commit 05e6b5a847
1 changed files with 7 additions and 0 deletions

View File

@ -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)