Skip to content

Commit

Permalink
refactor switches
Browse files Browse the repository at this point in the history
  • Loading branch information
kavishgr committed Apr 11, 2024
1 parent e77a0b4 commit 5a8d9b3
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ func main() {
version = "0.1.2"
)

if opts.Version{
fmt.Println("getghrel version: ", version)
os.Exit(1)
}

if token == "" {
fmt.Println("GITHUB_TOKEN environment variable is not found.")
fmt.Println("Nor is -ghtoken provided on the command line.")
Expand Down Expand Up @@ -66,8 +71,6 @@ func main() {
jobs.Wait() // wait for above jobs to finish

switch {
case opts.Version:
fmt.Println("getghrel version: ", version)

case opts.List:
return
Expand Down

0 comments on commit 5a8d9b3

Please sign in to comment.