Skip to content

Commit

Permalink
explicitly require a token for ASN.
Browse files Browse the repository at this point in the history
this was causing issues for e.g.
#42
  • Loading branch information
UmanShahzad committed May 19, 2021
1 parent 148cef6 commit 05ff7d6
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions ipinfo/cmd_asn.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,13 @@ func cmdASN(asn string) error {
}

ii = prepareIpinfoClient(fTok)

// require token for ASN API.
if ii.Token == "" {
fmt.Println("ASN lookups require a token")
return nil
}

data, err := ii.GetASNDetails(asn)
if err != nil {
return err
Expand Down

0 comments on commit 05ff7d6

Please sign in to comment.