Skip to content

Commit ceadb88

Browse files
committed
Run golangci-lint with fix flag
1 parent f3a707d commit ceadb88

File tree

7 files changed

+13
-11
lines changed

7 files changed

+13
-11
lines changed

decoder.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,14 @@ const (
2929
_Slice
3030
// We don't use the next two. They are placeholders. See the spec
3131
// for more details.
32-
_Container // nolint: deadcode, varcheck
33-
_Marker // nolint: deadcode, varcheck
32+
_Container //nolint: deadcode, varcheck
33+
_Marker //nolint: deadcode, varcheck
3434
_Bool
3535
_Float32
3636
)
3737

3838
const (
39-
// This is the value used in libmaxminddb
39+
// This is the value used in libmaxminddb.
4040
maximumDataStructureDepth = 512
4141
)
4242

@@ -820,7 +820,7 @@ func (d *decoder) decodeKey(offset uint) ([]byte, uint, error) {
820820

821821
// This function is used to skip ahead to the next value without decoding
822822
// the one at the offset passed in. The size bits have different meanings for
823-
// different data types
823+
// different data types.
824824
func (d *decoder) nextValueOffset(offset, numberToSkip uint) (uint, error) {
825825
if numberToSkip == 0 {
826826
return offset, nil

decoder_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ func TestUint64(t *testing.T) {
168168
validateDecoding(t, uints)
169169
}
170170

171-
// Dedup with above somehow
171+
// Dedup with above somehow.
172172
func TestUint128(t *testing.T) {
173173
ctrlByte := "03"
174174
bits := uint(128)
@@ -190,7 +190,7 @@ func TestUint128(t *testing.T) {
190190
}
191191

192192
// No pow or bit shifting for big int, apparently :-(
193-
// This is _not_ meant to be a comprehensive power function
193+
// This is _not_ meant to be a comprehensive power function.
194194
func powBigInt(bi *big.Int, pow uint) *big.Int {
195195
newInt := big.NewInt(1)
196196
for i := uint(0); i < pow; i++ {

example_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import (
88
"github.com/oschwald/maxminddb-golang"
99
)
1010

11-
// This example shows how to decode to a struct
11+
// This example shows how to decode to a struct.
1212
func ExampleReader_Lookup_struct() {
1313
db, err := maxminddb.Open("test-data/test-data/GeoIP2-City-Test.mmdb")
1414
if err != nil {
@@ -33,7 +33,7 @@ func ExampleReader_Lookup_struct() {
3333
// GB
3434
}
3535

36-
// This example demonstrates how to decode to an interface{}
36+
// This example demonstrates how to decode to an interface{}.
3737
func ExampleReader_Lookup_interface() {
3838
db, err := maxminddb.Open("test-data/test-data/GeoIP2-City-Test.mmdb")
3939
if err != nil {
@@ -52,7 +52,7 @@ func ExampleReader_Lookup_interface() {
5252
}
5353

5454
// This example demonstrates how to iterate over all networks in the
55-
// database
55+
// database.
5656
func ExampleReader_Networks() {
5757
db, err := maxminddb.Open("test-data/test-data/GeoIP2-Connection-Type-Test.mmdb")
5858
if err != nil {

mmap_unix.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
//go:build !windows && !appengine && !plan9
12
// +build !windows,!appengine,!plan9
23

34
package maxminddb

reader_other.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
//go:build !appengine && !plan9
12
// +build !appengine,!plan9
23

34
package maxminddb

reader_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ func checkDecodingToInterface(t *testing.T, recordInterface interface{}) {
238238
assert.Equal(t, bigInt, record["uint128"])
239239
}
240240

241-
// nolint: maligned
241+
//nolint: maligned
242242
type TestType struct {
243243
Array []uint `maxminddb:"array"`
244244
Boolean bool `maxminddb:"boolean"`

traverse.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ var (
2727
allIPv6 = &net.IPNet{IP: make(net.IP, 16), Mask: net.CIDRMask(0, 128)}
2828
)
2929

30-
// NetworksOption are options for Networks and NetworksWithin
30+
// NetworksOption are options for Networks and NetworksWithin.
3131
type NetworksOption func(*Networks)
3232

3333
// SkipAliasedNetworks is an option for Networks and NetworksWithin that

0 commit comments

Comments
 (0)