mfer/src/app.go

26 lines
338 B
Go
Raw Normal View History

2022-02-02 05:36:20 +00:00
package mfer
import (
"os"
)
2022-02-02 09:46:25 +00:00
var NO_COLOR bool
2022-02-02 06:39:50 +00:00
func init() {
2022-02-02 09:46:25 +00:00
NO_COLOR = false
2022-02-02 06:39:50 +00:00
if _, exists := os.LookupEnv("NO_COLOR"); exists {
2022-02-02 09:46:25 +00:00
NO_COLOR = true
2022-02-02 06:39:50 +00:00
}
}
2022-02-02 05:43:48 +00:00
func Run(Appname, Version, Buildarch string) int {
2022-02-02 09:46:25 +00:00
m := &mfer{}
m.appname = Appname
m.version = Version
m.buildarch = Buildarch
m.exitCode = 0
m.run()
return m.exitCode
2022-02-02 05:36:20 +00:00
}