Facelift info package

This commit is contained in:
Daniel 2019-03-12 22:54:43 +01:00
parent 221e003e33
commit 3188134203

View file

@ -15,7 +15,7 @@ var (
)
func init() {
modules.Register("info", prep, start, stop)
modules.Register("info", prep, nil, nil)
flag.BoolVar(&showVersion, "version", false, "show version and exit")
}
@ -32,6 +32,7 @@ func prep() error {
return nil
}
// CheckVersion checks if the metadata is ok.
func CheckVersion() error {
if !strings.HasSuffix(os.Args[0], ".test") {
if name == "[NAME]" ||
@ -48,6 +49,7 @@ func CheckVersion() error {
return nil
}
// PrintVersion prints the version, if requested, and returns if it did so.
func PrintVersion() (printed bool) {
if showVersion {
fmt.Println(FullVersion())
@ -55,11 +57,3 @@ func PrintVersion() (printed bool) {
}
return false
}
func start() error {
return nil
}
func stop() error {
return nil
}