Skip to content

Commit c05e7c5

Browse files
committed
Remove deprecated FromBytes API
1 parent c661b4a commit c05e7c5

File tree

2 files changed

+2
-11
lines changed

2 files changed

+2
-11
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
- Updated dependency on `github.com/oschwald/maxminddb-golang/v2` to `v2.0.0`.
44
- Add configurable `Option` helpers so `Open` and `OpenBytes` can accept
55
future options.
6+
- **BREAKING CHANGE**: Removed deprecated `FromBytes` method. Use `OpenBytes`
7+
instead.
68

79
# 2.0.0-beta.4 - 2025-08-23
810

reader.go

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -144,17 +144,6 @@ func OpenBytes(bytes []byte, options ...Option) (*Reader, error) {
144144
return &Reader{reader, dbType}, err
145145
}
146146

147-
// FromBytes takes a byte slice corresponding to a GeoIP2/GeoLite2 database
148-
// file and returns a Reader struct or an error. Note that the byte slice is
149-
// used directly; any modification of it after opening the database will result
150-
// in errors while reading from the database.
151-
//
152-
// Deprecated: Use OpenBytes instead. FromBytes will be removed in a future
153-
// version.
154-
func FromBytes(bytes []byte, options ...Option) (*Reader, error) {
155-
return OpenBytes(bytes, options...)
156-
}
157-
158147
func getDBType(reader *maxminddb.Reader) (databaseType, error) {
159148
switch reader.Metadata.DatabaseType {
160149
case "GeoIP2-Anonymous-IP":

0 commit comments

Comments
 (0)