Skip to content

Commit

Permalink
dont print ip twice in header.
Browse files Browse the repository at this point in the history
also put batch timeout in default cmd.
  • Loading branch information
UmanShahzad committed Apr 16, 2022
1 parent 61d660b commit e37c8ad
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 3 additions & 1 deletion ipinfo/cmd_default.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,9 @@ func cmdDefault() (err error) {
return errors.New("bulk lookups require a token; login via `ipinfo login`.")
}

data, err := ii.GetIPInfoBatch(ips, ipinfo.BatchReqOpts{})
data, err := ii.GetIPInfoBatch(ips, ipinfo.BatchReqOpts{
TimeoutPerBatch: 60 * 30, // 30min
})
if err != nil {
return err
}
Expand Down
1 change: 0 additions & 1 deletion ipinfo/utils_output.go
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,6 @@ func outputFieldBatchCore(
}
}
if !hasIPField {
fmt.Printf("ip,")
fields = append([]string{"ip"}, fields...)
}
}
Expand Down

0 comments on commit e37c8ad

Please sign in to comment.