package config import ( "git.dotya.ml/mirre-mt/pcmt/slogging" "github.com/philandstuff/dhall-golang/v6" ) type Config struct { Host string Port int AppName string LiveMode bool DevelMode bool SessionCookieName string SessionCookieSecret string } func LoadConfig(path string) (*Config, error) { var config Config err := dhall.UnmarshalFile(path, &config) if err != nil { return nil, err } slogging.GetLogger().Debugf("parsed config: %+v", config) return &config, nil }