✨ Load config from TOML
This commit is contained in:
parent
e7b88bcc09
commit
9ddaa98ff4
5 changed files with 47 additions and 7 deletions
8
config/load.go
Normal file
8
config/load.go
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
package config
|
||||
|
||||
import "github.com/BurntSushi/toml"
|
||||
|
||||
func LoadFromToml(path string) (c Config, err error) {
|
||||
_, err = toml.DecodeFile(path, &c)
|
||||
return
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue