Skip to content

Commit

Permalink
Merge pull request #23 from HelmiRifai/maxmind_log
Browse files Browse the repository at this point in the history
skip update when no maxmind license present
  • Loading branch information
optimatiq authored Jan 30, 2020
2 parents e63a904 + 8bcc14e commit a8e3d6c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ip/maxmind.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,11 @@ func (g *maxmind) update() error {
log.Debug("[geoip] update start")
defer log.Debug("[geoip] update finished")

if g.license == "" {
log.Debug("[geoip] no license, skip update")
return nil
}

if err := os.MkdirAll(maxmindDir, 0750); err != nil {
return fmt.Errorf("cannot create directory %s , error: %w", maxmindDir, err)
}
Expand Down

0 comments on commit a8e3d6c

Please sign in to comment.