twister/internal/config/parse.go

16 lines
214 B
Go
Raw Normal View History

2024-10-09 11:59:42 +00:00
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
}