@@ -17,8 +17,6 @@ import (
1717 "github.com/cli/cli/utils"
1818)
1919
20- var isWindows bool
21-
2220var thankYou = `
2321 _ _
2422 | | | |
@@ -37,9 +35,6 @@ _|_ | | __, _ _ | | __
3735`
3836
3937func init () {
40- rand .Seed (time .Now ().UnixNano ())
41- isWindows = runtime .GOOS == "windows"
42-
4338 RootCmd .AddCommand (creditsCmd )
4439
4540 creditsCmd .Flags ().BoolP ("static" , "s" , false , "Print a static version of the credits" )
@@ -54,14 +49,15 @@ Examples:
5449
5550 gh credits # see a credits animation for this project
5651 gh credits owner/repo # see a credits animation for owner/repo
57- gh credts -s # display a static thank you instead of animating
52+ gh credits -s # display a non-animated thank you
5853 gh credits | cat # just print the contributors, one per line
5954` ,
6055 Args : cobra .MaximumNArgs (1 ),
6156 RunE : credits ,
6257}
6358
6459func credits (cmd * cobra.Command , args []string ) error {
60+ isWindows := runtime .GOOS == "windows"
6561 ctx := contextForCommand (cmd )
6662 client , err := apiClientForContext (ctx )
6763 if err != nil {
@@ -127,6 +123,8 @@ func credits(cmd *cobra.Command, args []string) error {
127123 return nil
128124 }
129125
126+ rand .Seed (time .Now ().UnixNano ())
127+
130128 lines := []string {}
131129
132130 thankLines := strings .Split (thankYou , "\n " )
0 commit comments