@@ -31,7 +31,6 @@ type BrowseOptions struct {
3131 WikiFlag bool
3232 SettingsFlag bool
3333 BranchFlag bool
34- //LineFlag bool
3534}
3635
3736type exitCode int
@@ -139,7 +138,6 @@ func openInBrowser(cmd *cobra.Command, opts *BrowseOptions) error {
139138 }
140139
141140 return printExit (response , cmd , opts , repoUrl )
142-
143141}
144142
145143func addCombined (opts * BrowseOptions , url string , branchName string ) (exitCode , string ) {
@@ -158,7 +156,6 @@ func addCombined(opts *BrowseOptions, url string, branchName string) (exitCode,
158156 }
159157
160158 return exitUrlSuccess , url + "/tree/" + opts .AdditionalArg + "/" + arr [0 ]
161-
162159}
163160
164161func addFlag (opts * BrowseOptions , url string ) (exitCode , string ) {
@@ -169,7 +166,7 @@ func addFlag(opts *BrowseOptions, url string) (exitCode, string) {
169166 } else if opts .WikiFlag {
170167 return exitUrlSuccess , url + "/wiki"
171168 }
172- return exitExpectedArg , "" // Flag is a branch and needs an argument
169+ return exitExpectedArg , ""
173170}
174171
175172func addArg (opts * BrowseOptions , url string , branchName string ) (exitCode , string ) {
@@ -204,10 +201,8 @@ func printExit(exit exitCode, cmd *cobra.Command, opts *BrowseOptions, url strin
204201 switch exit {
205202 case exitUrlSuccess :
206203 fmt .Fprintf (w , "now opening %s in browser . . .\n " , cs .Bold (url ))
207- break
208204 case exitNonUrlSuccess :
209205 fmt .Fprintf (w , "now opening issue/pr in browser . . .\n " )
210- break
211206 case exitNotInRepo :
212207 return fmt .Errorf ("change directory to a repository to open in browser\n %s" , help )
213208 case exitTooManyFlags :
0 commit comments