Skip to content

Commit

Permalink
設定ミスのときに config error を出力して終了する
Browse files Browse the repository at this point in the history
  • Loading branch information
kitsuyui committed Dec 26, 2016
1 parent 0f310a5 commit 816690a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions exip.go
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,9 @@ func pickMapMaxItem(m map[string]float64) (string, float64) {

func main() {
retrievables, err := defaultSettings()
if err != nil {
log.Fatal("config error")
}
sip, err := pickupMaxScore(retrievables)
if err == nil && sip.Score >= 0.5 {
fmt.Print(sip.IP.String())
Expand Down

0 comments on commit 816690a

Please sign in to comment.