Skip to content

Commit 7eaf791

Browse files
chore: improve --version command
1 parent 159e48c commit 7eaf791

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

cmd/github-mcp-server/main.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ var (
3030
Use: "server",
3131
Short: "GitHub MCP Server",
3232
Long: `A GitHub MCP server that handles various tools and resources.`,
33-
Version: version,
33+
Version: fmt.Sprintf("Version: %s\nCommit: %s\nBuild Date: %s", version, commit, date),
3434
}
3535

3636
stdioCmd = &cobra.Command{
@@ -64,8 +64,7 @@ var (
6464
func init() {
6565
cobra.OnInitialize(initConfig)
6666

67-
rootCmd.SetVersionTemplate(fmt.Sprintf(
68-
"GitHub MCP Server\nVersion: %s\nCommit: %s\nBuild Date: %s\n", version, commit, date))
67+
rootCmd.SetVersionTemplate("{{.Short}}\n{{.Version}}\n")
6968

7069
// Add global flags that will be shared by all commands
7170
rootCmd.PersistentFlags().Bool("read-only", false, "Restrict the server to read-only operations")

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy