mirror of
https://github.com/daeuniverse/dae.git
synced 2025-01-03 13:31:00 +07:00
feat(cmd): extend --version print info (#356)
This commit is contained in:
parent
25c047a766
commit
b7aea958f3
10
cmd/cmd.go
10
cmd/cmd.go
@ -1,6 +1,10 @@
|
|||||||
package cmd
|
package cmd
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"fmt"
|
||||||
|
"runtime"
|
||||||
|
"strings"
|
||||||
|
|
||||||
"github.com/daeuniverse/dae/config"
|
"github.com/daeuniverse/dae/config"
|
||||||
"github.com/spf13/cobra"
|
"github.com/spf13/cobra"
|
||||||
)
|
)
|
||||||
@ -24,6 +28,12 @@ var (
|
|||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
config.Version = Version
|
config.Version = Version
|
||||||
|
rootCmd.Version = strings.Join([]string{
|
||||||
|
Version,
|
||||||
|
fmt.Sprintf("go runtime %v %v/%v", runtime.Version(), runtime.GOOS, runtime.GOARCH),
|
||||||
|
"Copyright (c) 2023 dae",
|
||||||
|
"License GNU AGPLv3 <https://github.com/daeuniverse/dae/blob/main/LICENSE>",
|
||||||
|
}, "\n")
|
||||||
}
|
}
|
||||||
|
|
||||||
// Execute executes the root command.
|
// Execute executes the root command.
|
||||||
|
Loading…
Reference in New Issue
Block a user