refactor and add version response

This commit is contained in:
anianz
2020-11-11 00:52:11 +01:00
parent 4db2e8abb3
commit 9917d5e3e4
3 changed files with 79 additions and 22 deletions

13
common/common.go Normal file
View File

@@ -0,0 +1,13 @@
package common
import (
"fmt"
"os"
)
func Check(err error, msg string) {
if err != nil {
fmt.Fprintf(os.Stderr, msg+": %s\n", err)
os.Exit(1)
}
}