GitLab_MergeDevel2Default/utils/utils.go

23 lines
412 B
Go

package utils
import (
"fmt"
"os"
)
// OptBool return ref of bool - dont ask it is go
func OptBool(val bool) *bool {
return &val
}
// OptString return ref of string - dont ask it is go
func OptString(val string) *string {
return &val
}
// Error format the error and exec the program with given status
func Error(status int, format string, a ...interface{}) {
fmt.Printf(format, a...)
os.Exit(status)
}