Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitc05e7c5

Browse files
committed
Remove deprecated FromBytes API
1 parentc661b4a commitc05e7c5

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-
funcFromBytes(bytes []byte,options...Option) (*Reader,error) {
155-
returnOpenBytes(bytes,options...)
156-
}
157-
158147
funcgetDBType(reader*maxminddb.Reader) (databaseType,error) {
159148
switchreader.Metadata.DatabaseType {
160149
case"GeoIP2-Anonymous-IP":

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp