.github/workflows: adding golangci-lint as new job (#453)

In order to follow golang's best practices, we should lint the code base properly beyond usual syntax mistakes.
This commit is contained in:
Stefan Benten
2021-12-26 14:03:27 +01:00
committed by GitHub
parent 5932a194b2
commit 2fbd19365c
9 changed files with 98 additions and 53 deletions

View File

@ -279,3 +279,9 @@ func formatSize(size int64) string {
getSuffix := suffixes[int(math.Floor(base))]
return fmt.Sprintf("%s %s", strconv.FormatFloat(newVal, 'f', -1, 64), getSuffix)
}
func CloseCheck(f func() error) {
if err := f(); err != nil {
fmt.Println("Received close error:", err)
}
}