Single commit page showing message, metadata and full diff.

john / johnbot / a3f9c2
lisa · 2h · 1 file · +4 -1
fix panic when config is empty
empty config.toml hit a nil deref on load. return defaults instead.
config.go
@@ -41,7 +41,10 @@ func Load
41  f, err := os.Open(path)
 - return cfg
42+ if len(raw) == 0 {
43+   return Default(), nil
44+ }
45+ return cfg, nil
46  }
reachable from master · closed thread 47 · build ok on uproar.local
parent 8b1d44barerepo 0.1.0