Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegistMarshaller ¶
func RegistMarshaller(input Marshaller)
registe your marshaller implementation
Types ¶
type ConfigureParser ¶
type ConfigureParser struct {
// contains filtered or unexported fields
}
func NewConfigureParser ¶
func NewConfigureParser(home string, fileName string) *ConfigureParser
func (*ConfigureParser) Load ¶
func (cnf *ConfigureParser) Load(ouput interface{}) error
load config to output
func (*ConfigureParser) LoadWithMerge ¶
func (cnf *ConfigureParser) LoadWithMerge(output interface{}, toMerge interface{}) error
load with default value
func (*ConfigureParser) Save ¶
func (cnf *ConfigureParser) Save(input interface{}) error
save input to config file
type Marshaller ¶
type Marshaller interface { Marshal(interface{}) ([]byte, error) Unmarshal([]byte, interface{}) error Type() string }
func GetMarshaller ¶
func GetMarshaller(name string) Marshaller
get marshaller implementation by type name
Click to show internal directories.
Click to hide internal directories.