MCPcopy Create free account
hub / github.com/dotzero/git-profile / Version

Function Version

cmd/version.go:10–23  ·  view source on GitHub ↗

Version returns `version` command

(c *Cmd)

Source from the content-addressed store, hash-verified

8
9// Version returns `version` command
10func Version(c *Cmd) *cobra.Command {
11 return &cobra.Command{
12 Use: "version",
13 Short: "Print version information",
14 Long: "Print the version, commit hash, and build date.",
15 Example: "git-profile version",
16 Run: func(cmd *cobra.Command, _ []string) {
17 ui.Println(cmd, ui.InfoStyle, "Git Profile")
18 ui.Println(cmd, ui.DefaultStyle, "Version: %s", c.Version)
19 ui.Println(cmd, ui.DefaultStyle, "Commit hash: %s", c.CommitHash)
20 ui.Println(cmd, ui.DefaultStyle, "Compiled on %s", c.CompileDate)
21 },
22 }
23}

Callers 1

initMethod · 0.85

Calls 1

PrintlnFunction · 0.92

Tested by

no test coverage detected