Skip to content

Commit a9b63df

Browse files
committed
Fix some flags not shown in help menu
1 parent b178ab9 commit a9b63df

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

cmd/build.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,6 @@ var buildCmd = &cobra.Command{
6666
func init() {
6767
rootCmd.AddCommand(buildCmd)
6868
buildCmd.Flags().StringP("output", "o", "", "The name of the output file.")
69-
buildCmd.Flags().String("os", "current", "The target OS for compiled languages. (possible values: windows, macos, linux)")
70-
buildCmd.Flags().String("arch", "current", "The target architecture for compiled languages. (possible values: x64, x86, arm32, arm64)")
69+
buildCmd.Flags().StringP("os", "", "current", "The target OS for compiled languages. (possible values: windows, macos, linux)")
70+
buildCmd.Flags().StringP("arch", "", "current", "The target architecture for compiled languages. (possible values: x64, x86, arm32, arm64)")
7171
}

cmd/game_create.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,6 @@ var gameCreateCmd = &cobra.Command{
7171

7272
func init() {
7373
gameCmd.AddCommand(gameCreateCmd)
74-
gameCreateCmd.Flags().Bool("public", false, "The game is displayed on a public game list.")
75-
gameCreateCmd.Flags().Bool("protected", false, "You can only join the game with the returned join secret.")
74+
gameCreateCmd.Flags().BoolP("public", "", false, "The game is displayed on a public game list.")
75+
gameCreateCmd.Flags().BoolP("protected", "", false, "You can only join the game with the returned join secret.")
7676
}

cmd/game_list.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,6 @@ var gameListCmd = &cobra.Command{
5454

5555
func init() {
5656
gameCmd.AddCommand(gameListCmd)
57-
gameListCmd.Flags().Bool("protected", false, "Only show protected games.")
58-
gameListCmd.Flags().Bool("unprotected", false, "Only show unprotected games.")
57+
gameListCmd.Flags().BoolP("protected", "", false, "Only show protected games.")
58+
gameListCmd.Flags().BoolP("unprotected", "", false, "Only show unprotected games.")
5959
}

0 commit comments

Comments
 (0)