2018-11-06 17:01:36 +00:00
|
|
|
package cnf
|
|
|
|
|
2018-11-07 13:03:30 +00:00
|
|
|
import (
|
|
|
|
"io"
|
|
|
|
)
|
|
|
|
|
2018-11-06 17:01:36 +00:00
|
|
|
// ConfigurationFormat is the common interface for all configuration parser
|
|
|
|
type ConfigurationFormat interface {
|
2018-11-07 13:03:30 +00:00
|
|
|
// Parse the given file
|
|
|
|
Parse(io.Reader) error
|
|
|
|
|
2018-11-06 17:01:36 +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
|
|
|
|
}
|