21 lines
394 B
Go
21 lines
394 B
Go
package cnf
|
|
|
|
import (
|
|
"io"
|
|
)
|
|
|
|
// ConfigurationFormat is the common interface for all configuration parser
|
|
type ConfigurationFormat interface {
|
|
// Read the given file
|
|
Read(io.Reader) error
|
|
|
|
// Write the given update to the file
|
|
Write(io.Writer) error
|
|
|
|
// 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
|
|
}
|