Replace ErrNotFound constant with errors.New for consistent error handling
This commit is contained in:
@@ -2,13 +2,14 @@ package geoip2
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"fmt"
|
||||
"net/netip"
|
||||
"strings"
|
||||
)
|
||||
|
||||
// ErrNotFound is returned when the database does not contain the IP address.
|
||||
const ErrNotFound = "not found"
|
||||
var ErrNotFound = errors.New("not found")
|
||||
|
||||
// Info is a structure that contains information about the IP address.
|
||||
type Info struct {
|
||||
|
||||
Reference in New Issue
Block a user