File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -135,13 +135,13 @@ type mmapCleanup struct {
135135// All of the methods on Reader are thread-safe. The struct may be safely
136136// shared across goroutines.
137137type Reader struct {
138- buffer [] byte
138+ hasMappedFile * atomic. Bool
139139 decoder decoder.ReflectionDecoder
140+ buffer []byte
140141 Metadata Metadata
141142 ipv4Start uint
142143 ipv4StartBitDepth int
143144 nodeOffsetMult uint
144- hasMappedFile * atomic.Bool
145145}
146146
147147// Metadata holds the metadata decoded from the MaxMind DB file.
Original file line number Diff line number Diff line change @@ -78,7 +78,7 @@ func TestReaderLeaks(t *testing.T) {
7878 // We intentionally do NOT call Close() to test if GC picks it up
7979 // and if AddCleanup doesn't prevent it.
8080
81- runtime .SetFinalizer (r , func (obj * Reader ) {
81+ runtime .SetFinalizer (r , func (* Reader ) {
8282 close (collected )
8383 })
8484 }()
You can’t perform that action at this time.
0 commit comments