Skip to content

Commit aefbcb0

Browse files
committed
Add change log
1 parent e829a9b commit aefbcb0

File tree

1 file changed

+171
-0
lines changed

1 file changed

+171
-0
lines changed

CHANGELOG.md

Lines changed: 171 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,171 @@
1+
# Changes
2+
3+
## 2.0.0-beta.3 - 2025-02-16
4+
5+
- `Open` will now fall back to loading the database in memory if the
6+
file-system does not support `mmap`. Pull request by database64128. GitHub
7+
#163.
8+
- Made significant improvements to the Windows memory-map handling. . GitHub
9+
#162.
10+
- Fix an integer overflow on large databases when using a 32-bit architecture.
11+
See ipinfo/mmdbctl#33.
12+
13+
## 2.0.0-beta.2 - 2024-11-14
14+
15+
- Allow negative indexes for arrays when using `DecodePath`. #152
16+
- Add `IncludeNetworksWithoutData` option for `Networks` and `NetworksWithin`.
17+
#155 and #156
18+
19+
## 2.0.0-beta.1 - 2024-08-18
20+
21+
This is the first beta of the v2 releases. Go 1.23 is required. I don't expect
22+
to do a final release until Go 1.24 is available. See #141 for the v2 roadmap.
23+
24+
Notable changes:
25+
26+
- `(*Reader).Lookup` now takes only the IP address and returns a `Result`.
27+
`Lookup(ip, &rec)` would now become `Lookup(ip).Decode(&rec)`.
28+
- `(*Reader).LookupNetwork` has been removed. To get the network for a result,
29+
use `(Result).Prefix()`.
30+
- `(*Reader).LookupOffset` now _takes_ an offset and returns a `Result`.
31+
`Result` has an `Offset()` method that returns the offset value.
32+
`(*Reader).Decode` has been removed.
33+
- Use of `net.IP` and `*net.IPNet` have been replaced with `netip.Addr` and
34+
`netip.Prefix`.
35+
- You may now decode a particular path within a database record using
36+
`(Result).DecodePath`. For instance, to decode just the country code in
37+
GeoLite2 Country to a string called `code`, you might do something like
38+
`Lookup(ip).DecodePath(&code, "country", "iso_code")`. Strings should be used
39+
for map keys and ints for array indexes.
40+
- `(*Reader).Networks` and `(*Reader).NetworksWithin` now return a Go 1.23
41+
iterator of `Result` values. Aliased networks are now skipped by default. If
42+
you wish to include them, use the `IncludeAliasedNetworks` option.
43+
44+
## 1.13.1 - 2024-06-28
45+
46+
- Return the `*net.IPNet` in canonical form when using `NetworksWithin` to look
47+
up a network more specific than the one in the database. Previously, the `IP`
48+
field on the `*net.IPNet` would be set to the IP from the lookup network
49+
rather than the first IP of the network.
50+
- `NetworksWithin` will now correctly handle an `*net.IPNet` parameter that is
51+
not in canonical form. This issue would only occur if the `*net.IPNet` was
52+
manually constructed, as `net.ParseCIDR` returns the value in canonical form
53+
even if the input string is not.
54+
55+
## 1.13.0 - 2024-06-03
56+
57+
- Go 1.21 or greater is now required.
58+
- The error messages when decoding have been improved. #119
59+
60+
## 1.12.0 - 2023-08-01
61+
62+
- The `wasi` target is now built without memory-mapping support. Pull request
63+
by Alex Kashintsev. GitHub #114.
64+
- When decoding to a map of non-scalar, non-interface types such as a
65+
`map[string]map[string]any`, the decoder failed to zero out the value for the
66+
map elements, which could result in incorrect decoding. Reported by JT Olio.
67+
GitHub #115.
68+
69+
## 1.11.0 - 2023-06-18
70+
71+
- `wasm` and `wasip1` targets are now built without memory-mapping support.
72+
Pull request by Randy Reddig. GitHub #110.
73+
74+
**Full Changelog**:
75+
https://github.com/oschwald/maxminddb-golang/compare/v1.10.0...v1.11.0
76+
77+
## 1.10.0 - 2022-08-07
78+
79+
- Set Go version in go.mod file to 1.18.
80+
81+
## 1.9.0 - 2022-03-26
82+
83+
- Set the minimum Go version in the go.mod file to 1.17.
84+
- Updated dependencies.
85+
- Minor performance improvements to the custom deserializer feature added in
86+
1.8.0.
87+
88+
## 1.8.0 - 2020-11-23
89+
90+
- Added `maxminddb.SkipAliasedNetworks` option to `Networks` and
91+
`NetworksWithin` methods. When set, this option will cause the iterator to
92+
skip networks that are aliases of the IPv4 tree.
93+
- Added experimental custom deserializer support. This allows much more control
94+
over the deserialization. The API is subject to change and you should use at
95+
your own risk.
96+
97+
## 1.7.0 - 2020-06-13
98+
99+
- Add `NetworksWithin` method. This returns an iterator that traverses all
100+
networks in the database that are contained in the given network. Pull
101+
request by Olaf Alders. GitHub #65.
102+
103+
## 1.6.0 - 2019-12-25
104+
105+
- This module now uses Go modules. Requested by Matthew Rothenberg. GitHub #49.
106+
- Plan 9 is now supported. Pull request by Jacob Moody. GitHub #61.
107+
- Documentation fixes. Pull request by Olaf Alders. GitHub #62.
108+
- Thread-safety is now mentioned in the documentation. Requested by Ken
109+
Sedgwick. GitHub #39.
110+
- Fix off-by-one error in file offset safety check. Reported by Will Storey.
111+
GitHub #63.
112+
113+
## 1.5.0 - 2019-09-11
114+
115+
- Drop support for Go 1.7 and 1.8.
116+
- Minor performance improvements.
117+
118+
## 1.4.0 - 2019-08-28
119+
120+
- Add the method `LookupNetwork`. This returns the network that the record
121+
belongs to as well as a boolean indicating whether there was a record for the
122+
IP address in the database. GitHub #59.
123+
- Improve performance.
124+
125+
## 1.3.1 - 2019-08-28
126+
127+
- Fix issue with the finalizer running too early on Go 1.12 when using the
128+
Verify method. Reported by Robert-André Mauchin. GitHub #55.
129+
- Remove unnecessary call to reflect.ValueOf. PR by SenseyeDeveloper. GitHub
130+
#53.
131+
132+
## 1.3.0 - 2018-02-25
133+
134+
- The methods on the `maxminddb.Reader` struct now return an error if called on
135+
a closed database reader. Previously, this could cause a segmentation
136+
violation when using a memory-mapped file.
137+
- The `Close` method on the `maxminddb.Reader` struct now sets the underlying
138+
buffer to nil, even when using `FromBytes` or `Open` on Google App Engine.
139+
- No longer uses constants from `syscall`
140+
141+
## 1.2.1 - 2018-01-03
142+
143+
- Fix incorrect index being used when decoding into anonymous struct fields. PR
144+
#42 by Andy Bursavich.
145+
146+
## 1.2.0 - 2017-05-05
147+
148+
- The database decoder now does bound checking when decoding data from the
149+
database. This is to help ensure that the reader does not panic when given a
150+
corrupt database to decode. Closes #37.
151+
- The reader will now return an error on a data structure with a depth greater
152+
than 512. This is done to prevent the possibility of a stack overflow on a
153+
cyclic data structure in a corrupt database. This matches the maximum depth
154+
allowed by `libmaxminddb`. All MaxMind databases currently have a depth of
155+
less than five.
156+
157+
## 1.1.0 - 2016-12-31
158+
159+
- Added appengine build tag for Windows. When enabled, memory-mapping will be
160+
disabled in the Windows build as it is for the non-Windows build. Pull
161+
request #35 by Ingo Oeser.
162+
- SetFinalizer is now used to unmap files if the user fails to close the
163+
reader. Using `r.Close()` is still recommended for most use cases.
164+
- Previously, an unsafe conversion between `[]byte` and string was used to
165+
avoid unnecessary allocations when decoding struct keys. The decoder now
166+
relies on a compiler optimization on `string([]byte)` map lookups to achieve
167+
this rather than using `unsafe`.
168+
169+
## 1.0.0 - 2016-11-09
170+
171+
New release for those using tagged releases.

0 commit comments

Comments
 (0)