Documentation ¶
Overview ¶
MIT License
Copyright (c) 2022 孟琦 ¶
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
MIT License ¶
Copyright (c) 2022 孟琦 ¶
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
MIT License ¶
Copyright (c) 2022 孟琦 ¶
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Index ¶
- type XmlConfig
- func (x *XmlConfig) BuildXmlData() ([]byte, error)
- func (x *XmlConfig) Get(key string) (string, error)
- func (x *XmlConfig) GetBool(key string, defaultBool bool) bool
- func (x *XmlConfig) GetConfigKeys() []string
- func (x *XmlConfig) GetInt(key string, defaultInt int) (int, error)
- func (x *XmlConfig) GetInt16(key string, defaultInt16 int16) (int16, error)
- func (x *XmlConfig) GetInt32(key string, defaultInt32 int32) (int32, error)
- func (x *XmlConfig) GetInt64(key string, defaultInt64 int64) (int64, error)
- func (x *XmlConfig) GetInt8(key string, defaultInt8 int8) (int8, error)
- func (x *XmlConfig) GetPropsWithPrefix(prefix string) map[string]string
- func (x *XmlConfig) GetString(key string, defaultString string) string
- func (x *XmlConfig) GetStrings(key, sep string) []string
- func (x *XmlConfig) GetTrimmedString(key string, defaultString string) string
- func (x *XmlConfig) GetTrimmedStrings(key, sep string) []string
- func (x *XmlConfig) GetUint(key string, defaultUint uint) (uint, error)
- func (x *XmlConfig) GetUint16(key string, defaultUint16 uint16) (uint16, error)
- func (x *XmlConfig) GetUint32(key string, defaultUint32 uint32) (uint32, error)
- func (x *XmlConfig) GetUint64(key string, defaultUint64 uint64) (uint64, error)
- func (x *XmlConfig) GetUint8(key string, defaultUint8 uint8) (uint8, error)
- func (x *XmlConfig) ParseXmlData(data []byte) error
- func (x *XmlConfig) Read(data []byte, r io.Reader) error
- func (x *XmlConfig) ReadXmlFile(xmlFilePath string) error
- func (x *XmlConfig) SetBool(key string, value bool)
- func (x *XmlConfig) SetIfUnset(key string, value string)
- func (x *XmlConfig) SetInt(key string, value int64)
- func (x *XmlConfig) SetString(key string, value string)
- func (x *XmlConfig) SetUint(key string, value uint64)
- func (x *XmlConfig) String() string
- func (x *XmlConfig) Write(w io.Writer) error
- func (x *XmlConfig) WriteXmlFile(xmlFilePath string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type XmlConfig ¶
type XmlConfig struct {
// contains filtered or unexported fields
}
XmlConfig TODO
func (*XmlConfig) BuildXmlData ¶ added in v1.0.4
BuildXmlData 构建xml配置
func (*XmlConfig) GetPropsWithPrefix ¶
GetPropsWithPrefix TODO
func (*XmlConfig) GetStrings ¶
GetStrings TODO
func (*XmlConfig) GetTrimmedString ¶
GetTrimmedString TODO
func (*XmlConfig) GetTrimmedStrings ¶
GetTrimmedStrings TODO
func (*XmlConfig) ParseXmlData ¶ added in v1.0.4
ParseXmlData TODO
func (*XmlConfig) ReadXmlFile ¶
ReadXmlFile 从xml文件中读取配置
func (*XmlConfig) SetIfUnset ¶
SetIfUnset TODO
func (*XmlConfig) WriteXmlFile ¶
WriteXmlFile 将配置信息写入xml文件