Skip to content

Commit

Permalink
No one saw that
Browse files Browse the repository at this point in the history
  • Loading branch information
andreimarcu committed Oct 27, 2015
1 parent 2b984a2 commit 70d75d4
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions util.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package main

import (
"fmt"
"os"
)

func checkErr(err error) {
if err != nil {
fmt.Println(err)
os.Exit(1)
}
}

func getInput(query string, allowBlank bool) (input string) {
for input == "" {
fmt.Print(query + ": ")
fmt.Scanf("%s\n", &input)

if allowBlank {
break
}
}

return
}

0 comments on commit 70d75d4

Please sign in to comment.