Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update dependencies #12

Merged
merged 4 commits into from
Jun 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 6 additions & 8 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,11 @@ jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
- uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7
- uses: golangci/golangci-lint-action@a4f60bb28d35aeee14e6880718e0c85ff1882e64
with:
go-version: '1.21'
- uses: golangci/golangci-lint-action@3a919529898de77ec3da873e3063ca4b10e7f5cc
with:
version: v1.55.2
version: v1.59.1
test:
strategy:
matrix:
Expand All @@ -27,8 +25,8 @@ jobs:
- oldstable
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
- uses: actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
- uses: actions/setup-go@cdcb36043654635271a94b9a6d1392de5bb323a7
with:
go-version: ${{ matrix.go-version }}
- name: build
Expand Down
11 changes: 3 additions & 8 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ linters:
- dupl
- dupword
- durationcheck
- err113
- errcheck
- errchkjson
- errname
- errorlint
- execinquery
- exportloopref
- forbidigo
- forcetypeassert
Expand All @@ -27,7 +27,6 @@ linters:
- gochecksumtype
- gocritic
- godot
- goerr113
- gofmt
- gofumpt
- goimports
Expand All @@ -42,7 +41,6 @@ linters:
- inamedparam
- ineffassign
- interfacebloat
- ireturn
- lll
- loggercheck
- makezero
Expand Down Expand Up @@ -83,7 +81,6 @@ linters:
- cyclop
- depguard
- exhaustive
- exhaustivestruct
- exhaustruct
- funlen
- gochecknoglobals
Expand All @@ -95,14 +92,13 @@ linters:
- goheader
- gomnd
- gomoddirectives
- ireturn
- maintidx
- maligned
- nakedret
- nestif
- nilnil
- nlreturn
- nonamedreturns
- nosnakecase
- paralleltest
- testpackage
- tparallel
Expand All @@ -123,7 +119,6 @@ linters-settings:
- prefix(github.com/twpayne/go-shapefile)
gofumpt:
extra-rules: true
lang-version: '1.18'
module-path: github.com/twpayne/go-shapefile
goimports:
local-prefixes: github.com/twpayne/go-shapefile
Expand All @@ -143,7 +138,7 @@ issues:
- EXC0011 # include issues about comments from `stylecheck`
exclude-rules:
- linters:
- goerr113
- err113
text: do not define dynamic errors, use wrapped static errors instead
- linters:
- gosec
Expand Down
2 changes: 1 addition & 1 deletion dbf.go
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ func TrimTrailingZeros(data []byte) []byte {

func parseCharacter(data []byte, decoder *encoding.Decoder) (string, error) {
if decoder == nil {
return "", fmt.Errorf("decoder is nil")
return "", errors.New("decoder is nil")
}
return decoder.String(string(bytes.TrimSpace(TrimTrailingZeros(data))))
}
Expand Down
10 changes: 5 additions & 5 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ module github.com/twpayne/go-shapefile
go 1.21

require (
github.com/alecthomas/assert/v2 v2.5.0
github.com/twpayne/go-geom v1.5.3
golang.org/x/net v0.20.0
golang.org/x/text v0.14.0
github.com/alecthomas/assert/v2 v2.6.0
github.com/twpayne/go-geom v1.5.4
golang.org/x/net v0.26.0
golang.org/x/text v0.16.0
)

require (
github.com/alecthomas/repr v0.3.0 // indirect
github.com/alecthomas/repr v0.4.0 // indirect
github.com/hexops/gotextdiff v1.0.3 // indirect
)
20 changes: 10 additions & 10 deletions go.sum
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
github.com/alecthomas/assert/v2 v2.5.0 h1:OJKYg53BQx06/bMRBSPDCO49CbCDNiUQXwdoNrt6x5w=
github.com/alecthomas/assert/v2 v2.5.0/go.mod h1:fw5suVxB+wfYJ3291t0hRTqtGzFYdSwstnRQdaQx2DM=
github.com/alecthomas/repr v0.3.0 h1:NeYzUPfjjlqHY4KtzgKJiWd6sVq2eNUPTi34PiFGjY8=
github.com/alecthomas/repr v0.3.0/go.mod h1:Fr0507jx4eOXV7AlPV6AVZLYrLIuIeSOWtW57eE/O/4=
github.com/alecthomas/assert/v2 v2.6.0 h1:o3WJwILtexrEUk3cUVal3oiQY2tfgr/FHWiz/v2n4FU=
github.com/alecthomas/assert/v2 v2.6.0/go.mod h1:Bze95FyfUr7x34QZrjL+XP+0qgp/zg8yS+TtBj1WA3k=
github.com/alecthomas/repr v0.4.0 h1:GhI2A8MACjfegCPVq9f1FLvIBS+DrQ2KQBFZP1iFzXc=
github.com/alecthomas/repr v0.4.0/go.mod h1:Fr0507jx4eOXV7AlPV6AVZLYrLIuIeSOWtW57eE/O/4=
github.com/hexops/gotextdiff v1.0.3 h1:gitA9+qJrrTCsiCl7+kh75nPqQt1cx4ZkudSTLoUqJM=
github.com/hexops/gotextdiff v1.0.3/go.mod h1:pSWU5MAI3yDq+fZBTazCSJysOMbxWL1BSow5/V2vxeg=
github.com/twpayne/go-geom v1.5.3 h1:UdH93XzTwpwPiAV38DJ74yg+9/YV9/WCGbKN+NmSvVA=
github.com/twpayne/go-geom v1.5.3/go.mod h1:scDv/u90MVD6K+/7cA44kQt9fD6M/n+VuLddERxWYR8=
golang.org/x/net v0.20.0 h1:aCL9BSgETF1k+blQaYUBx9hJ9LOGP3gAVemcZlf1Kpo=
golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY=
golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ=
golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU=
github.com/twpayne/go-geom v1.5.4 h1:b8fiZd0SsEmQEeUdz2atT6KggF1KHiaZIi3DGi5p+sI=
github.com/twpayne/go-geom v1.5.4/go.mod h1:Hw8RszQ2/d9Y/KfOm9CvUJo78BOoIA5g0e4P7JCVKvo=
golang.org/x/net v0.26.0 h1:soB7SVo0PWrY4vPW/+ay0jKDNScG2X9wFeYlXIvJsOQ=
golang.org/x/net v0.26.0/go.mod h1:5YKkiSynbBIh3p6iOc/vibscux0x38BZDkn8sCUPxHE=
golang.org/x/text v0.16.0 h1:a94ExnEXNtEwYLGJSIUxnWoxoRz/ZcCsV63ROupILh4=
golang.org/x/text v0.16.0/go.mod h1:GhwF1Be+LQoKShO3cGOHzqOgRrGaYc9AvblQOmPVHnI=
4 changes: 2 additions & 2 deletions scanner.go
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,7 @@ func (s *Scanner) Discard(n int) (int, error) {
s.scanSHP.scanRecords += n
}
} else if s.scanSHP != nil {
errSHP = fmt.Errorf("can't discard .shp file without .shx file")
errSHP = errors.New("can't discard .shp file without .shx file")
return
}
}()
Expand Down Expand Up @@ -717,7 +717,7 @@ func NewScannerDBF(reader io.ReadCloser, options *ReadDBFOptions) (*ScannerDBF,
totalLength += fieldDescriptor.Length
}
if totalLength+1 != header.RecordSize {
return nil, fmt.Errorf("invalid total length of fields")
return nil, errors.New("invalid total length of fields")
}

var decoder *encoding.Decoder
Expand Down