16 lines
214 B
Go
16 lines
214 B
Go
package config
|
|
|
|
import "github.com/BurntSushi/toml"
|
|
|
|
// Parse the config
|
|
func Parse(content []byte) *Config {
|
|
var cfg *Config
|
|
|
|
err := toml.Unmarshal(content, &cfg)
|
|
if err != nil {
|
|
panic(err)
|
|
}
|
|
|
|
return cfg
|
|
}
|