Verified Commit 171bca1b authored by AtjonTV's avatar AtjonTV

Misc: Run gofmt over all code

parent 8ceb4b9c
......@@ -6,5 +6,8 @@ clean:
build:
go build -o zabbix-cachet-bridge src/main.go
format:
gofmt -s -w .
install:
go mod download
......@@ -19,9 +19,9 @@ import (
)
type Database struct {
db *sql.DB
db *sql.DB
databaseTable string
isSqlite bool
isSqlite bool
}
func Init2(file *ini.File) *Database {
......@@ -48,7 +48,7 @@ func Init2(file *ini.File) *Database {
sdb, e = sql.Open("mysql", src)
} else {
panic("Unknown Database Driver: "+driver)
panic("Unknown Database Driver: " + driver)
}
if e != nil {
......@@ -171,4 +171,4 @@ func (d *Database) CloseIssueForEventId(eid int) bool {
}
return true
}
\ No newline at end of file
}
......@@ -178,4 +178,4 @@ func GetFirstExisting(c1 string, c2 string, c3 string) string {
panic("Cannot find any config file!")
return ""
}
\ No newline at end of file
}
......@@ -13,15 +13,14 @@ package zabbix
import "atvg-studios.com/zabbix-cachet-bridge/src/cachet"
type Status struct {
Host string `json:"host"`
Status string `json:"status"`
Date string `json:"date"`
Problem string `json:"problem"`
Host string `json:"host"`
Status string `json:"status"`
Date string `json:"date"`
Problem string `json:"problem"`
Severity string `json:"severity"`
EventId int `json:"event_id"`
EventId int `json:"event_id"`
}
func GetCachetSeverity(severity string) int {
switch severity {
case "Disaster":
......@@ -39,4 +38,4 @@ func GetCachetSeverity(severity string) int {
}
return cachet.Unknown
}
\ No newline at end of file
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment