Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExistsMultipleValues ¶ added in v1.0.0
func ExistsMultipleValues(c *MultiConfig, key string) bool
return true if the key exists, otherwise return false
func GetFirstValue ¶ added in v1.0.0
func GetFirstValue(c *MultiConfig, key string) string
return the first value which is associated with the key, if the key does not exist, return empty string
func GetMultipleValues ¶ added in v1.0.0
func GetMultipleValues(c *MultiConfig, key string) []string
return a slice of strings which are associated with the key, if the key does not exist, return an empty slice
Types ¶
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
func Parse ¶
read and parse the configuration from the reader, return a Config struct, if there is an error during reading, return an error
func (*Config) ExistsValue ¶
return true if the key exists, otherwise return false
type MultiConfig ¶ added in v1.0.0
type MultiConfig struct {
// contains filtered or unexported fields
}
func ParseMultipleValues ¶ added in v1.0.0
func ParseMultipleValues(r io.Reader) (*MultiConfig, error)
read and parse the configuration from the reader, return a MultiConfig struct, if there is an error during reading, return an error. The MultiConfig struct should support multiple values for the same key, and the values should be stored in a slice of strings.