Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CheckData ¶
func CheckData(data interface{}) error
CheckData - checks the validity of config data. Data should be of type struct and contain a string type field called "Version".
func CheckVersion ¶
CheckVersion - loads json and compares the version number provided returns back true or false - any failure is returned as error.
func FormatJSONSyntaxError ¶
func FormatJSONSyntaxError(data io.Reader, sErr *json.SyntaxError) error
FormatJSONSyntaxError generates a pretty printed json syntax error since golang doesn't provide an easy way to report the location of the error
Types ¶
type Config ¶
type Config interface {
String() string
Version() string
Save(string) error
Load(string) error
Data() interface{}
Diff(Config) ([]structs.Field, error)
DeepDiff(Config) ([]structs.Field, error)
}
Config - generic config interface functions
Click to show internal directories.
Click to hide internal directories.