Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitea19581

Browse files
joe-tonSamMorrowDrums
authored andcommitted
refactor: improve version output using SetVersionTemplate
1 parentff3036d commitea19581

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

‎cmd/github-mcp-server/main.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ var (
2929
Use:"server",
3030
Short:"GitHub MCP Server",
3131
Long:`A GitHub MCP server that handles various tools and resources.`,
32-
Version:fmt.Sprintf("%s (%s) %s",version,commit,date),
32+
Version:version,
3333
}
3434

3535
stdioCmd=&cobra.Command{
@@ -65,6 +65,9 @@ var (
6565
funcinit() {
6666
cobra.OnInitialize(initConfig)
6767

68+
rootCmd.SetVersionTemplate(fmt.Sprintf(
69+
"GitHub MCP Server\nVersion: %s\nCommit: %s\nBuild Date: %s\n",version,commit,date))
70+
6871
// Add global flags that will be shared by all commands
6972
rootCmd.PersistentFlags().StringSlice("toolsets",github.DefaultTools,"An optional comma separated list of groups of tools to allow, defaults to enabling all")
7073
rootCmd.PersistentFlags().Bool("dynamic-toolsets",false,"Enable dynamic toolsets")

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp