23 lines
478 B
Go
23 lines
478 B
Go
package cnf
|
|
|
|
import (
|
|
"io"
|
|
)
|
|
|
|
// ConfigurationFormat is the common interface for all configuration parser
|
|
type ConfigurationFormat interface {
|
|
// ReadFrom the given file
|
|
// implements io.ReaderFrom
|
|
ReadFrom(io.Reader) (int64, error)
|
|
|
|
// WriteTo a file the updated content
|
|
// implements io.WriterTo
|
|
WriteTo(io.Writer) (int64, 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
|
|
}
|