package
module
Version:
v0.2.0
Opens a new window with list of versions in this module.
Published: Feb 27, 2024
License: MIT
Opens a new window with license information.
Imports: 8
Opens a new window with list of imports.
Imported by: 8
Opens a new window with list of known importers.
README
¶
Config
Simple configure loader
Features
- support json/yaml
- default config path from env
CONF_FILE_PATH;
Example
package conf
import "github.com/isayme/go-config"
type Config struct {
Addr string `json:"addr" yaml:"addr"`
}
var cfg Config
func Get() *Config {
config.Parse(&cfg)
return &cfg
}
Documentation
¶
func Parse(v interface{}, path ...string)
Parse parse config
Source Files
¶
Click to show internal directories.
Click to hide internal directories.