lockserver/make-defaults-json.go
Finn 350fc3b339
All checks were successful
/ build-container (push) Successful in 1m3s
rip out all auth stuff, add a containerfile
2024-04-23 17:34:57 -07:00

31 lines
452 B
Go

package main
import (
"encoding/json"
"os"
"git.janky.solutions/finn/lockserver/config"
)
func main() {
if err := writeConfig("lockserver.defaults.json"); err != nil {
panic(err)
}
}
func writeConfig(path string) error {
f, err := os.Create(path)
if err != nil {
return err
}
defer f.Close()
encoder := json.NewEncoder(f)
encoder.SetIndent("", " ")
if err := encoder.Encode(config.C); err != nil {
return err
}
return nil
}