Commit Graph

3 Commits

Author SHA1 Message Date
Philipp b53172a0b1
missed a 0 2021-09-02 16:59:34 +02:00
Philipp 0010b6c1fc
fixed panic: runtime error: index out of range [0] with length 0
panic: runtime error: index out of range [0] with length 0

goroutine 1 [running]:
github.com/mrahbar/my-bloody-hetzner-sb-notifier/writer.(*TableWriter).Print(0xc00011be20, {{0x31e, 0x0}, {0x0, 0x0, 0x0}})
        /home/philipp/git/my-bloody-hetzner-sb-notifier/writer/table.go:25 +0x27a
main.run({0x731f00, 0xc0000ae008}, {0x0, 0x4041800000000000, 0x40, 0x100, 0x1800, 0x1800, 0x2, 0xf, ...}, ...)
        /home/philipp/git/my-bloody-hetzner-sb-notifier/main.go:251 +0x335
main.main()
        /home/philipp/git/my-bloody-hetzner-sb-notifier/main.go:138 +0x1a5

If no server was found we crashed, because we tried to print out the 0 element of an array.
2021-09-02 15:44:02 +02:00
Mahmoud Rahbar Azad 4a726291a2
added serve-http option 2018-10-26 22:31:39 +02:00