diff options
| author | Paul Buetow <paul@buetow.org> | 2023-04-18 23:15:01 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2023-04-18 23:15:01 +0300 |
| commit | 88c7597a3bed54002b27570f7f36b945cffd47ad (patch) | |
| tree | b8b2b7ead6fbc7740f565ecb96e2c6bc00638085 /main.go | |
| parent | 3658638e3bb3edb0f266c65fe0e42a1cd53a5f83 (diff) | |
split into main and internal package"
Diffstat (limited to 'main.go')
| -rw-r--r-- | main.go | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/main.go b/main.go deleted file mode 100644 index 850c37a..0000000 --- a/main.go +++ /dev/null @@ -1,30 +0,0 @@ -package main - -import ( - "flag" -) - -func main() { - configFile := flag.String("cfg", "/etc/gogios.json", "The config file") - flag.Parse() - - config, err := newConfig(*configFile) - if err != nil { - panic(err) - } - - state, err := readState(config) - if err != nil { - notifyError(config, err) - } - - state = execute(state, config) - - if err := state.persist(); err != nil { - notifyError(config, err) - } - - if subject, body, changed := state.report(); changed { - notify(config, subject, body) - } -} |
