aboutsummaryrefslogtreecommitdiff
path: root/cmd/acme/config.go
diff options
context:
space:
mode:
Diffstat (limited to 'cmd/acme/config.go')
-rw-r--r--cmd/acme/config.go15
1 files changed, 10 insertions, 5 deletions
diff --git a/cmd/acme/config.go b/cmd/acme/config.go
index 55cc13f..102eb0c 100644
--- a/cmd/acme/config.go
+++ b/cmd/acme/config.go
@@ -58,13 +58,18 @@ var (
errNoMail = errors.New("no mail specified")
)
-func Dump(c *Config) (string, error) {
+func DumpYAML(c *Config) (string, error) {
out, err := yaml.Marshal(c)
- if err != nil {
- return "", err
- }
- return string(out), nil
+ return string(out), err
+}
+
+/*
+func DumpTOML(c *Config) (string, error) {
+ buf := &bytes.Buffer{}
+ err := toml.NewEncoder(buf).Encode(c)
+ return buf.String(), err
}
+*/
func LoadConfig(fname string) (*Config, error) {
conf, err := ioutil.ReadFile(fname)