mirror of
https://github.com/safing/portbase
synced 2025-09-01 10:09:50 +00:00
Facelift info package
This commit is contained in:
parent
221e003e33
commit
3188134203
1 changed files with 3 additions and 9 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue