mirror of
https://github.com/joohoi/acme-dns.git
synced 2024-12-22 22:03:58 +07:00
15 lines
283 B
Go
15 lines
283 B
Go
package main
|
|
|
|
import (
|
|
"errors"
|
|
"github.com/BurntSushi/toml"
|
|
)
|
|
|
|
func ReadConfig(fname string) (DnsConfig, error) {
|
|
var conf DnsConfig
|
|
if _, err := toml.DecodeFile(fname, &conf); err != nil {
|
|
return DnsConfig{}, errors.New("Malformed configuration file")
|
|
}
|
|
return conf, nil
|
|
}
|