You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: cmd/rockpaperscissors.go
+9-2Lines changed: 9 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,7 @@
2
2
// The game logic is in the internal/rockpaperscissors package.
3
3
4
4
// This file sets up the command line interface for the game. It should call the PlayGame function from the rockpaperscissors package.
5
-
5
+
// Package cmd contains all the commands for the CLI application.
6
6
package cmd
7
7
8
8
import (
@@ -13,6 +13,8 @@ import (
13
13
"github.com/spf13/cobra"
14
14
)
15
15
16
+
varsecretModebool
17
+
16
18
// rootCmd represents the base command when called without any subcommands
17
19
varrockPaperScissorsCmd=&cobra.Command{
18
20
Use: "rockpaperscissors",
@@ -21,6 +23,11 @@ var rockPaperScissorsCmd = &cobra.Command{
21
23
You can choose from rock, paper, or scissors. The computer will randomly choose its move and the winner will be determined based on the rules of the game.`,
0 commit comments