go uptime monitor
at main 366 B view raw
1package config 2 3import ( 4 "github.com/BurntSushi/toml" 5 6 "tangled.sh/seiso.moe/hestia/check" 7) 8 9type Config struct { 10 Checks []check.Check `toml:"check"` 11 Retention int `toml:"retention"` 12} 13 14func LoadConfig(path string) (*Config, error) { 15 var cfg Config 16 if _, err := toml.DecodeFile(path, &cfg); err != nil { 17 return nil, err 18 } 19 20 return &cfg, nil 21}