Skip to content

Commit 23a8d78

Browse files
Merge pull request #15 from goark/refactoring
Bump up exernal packages
2 parents a557e80 + 2496183 commit 23a8d78

9 files changed

Lines changed: 37 additions & 37 deletions

File tree

.github/workflows/build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@ jobs:
1515
- name: Set up Go
1616
uses: actions/setup-go@v3
1717
with:
18-
go-version: 1.19.5
18+
go-version-file: 'go.mod'
1919
- name: Run GoReleaser
2020
uses: goreleaser/goreleaser-action@v3
2121
with:
2222
# either 'goreleaser' (default) or 'goreleaser-pro'
2323
distribution: goreleaser
2424
version: latest
25-
args: release --rm-dist
25+
args: release --clean
2626
env:
2727
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2828
# Your GoReleaser Pro key, if you are using the 'goreleaser-pro' distribution

.github/workflows/lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
- uses: actions/checkout@v3
1818
- uses: actions/setup-go@v3
1919
with:
20-
go-version: 1.19.5
20+
go-version-file: 'go.mod'
2121
- name: golangci-lint
2222
uses: golangci/golangci-lint-action@v3
2323
with:

.github/workflows/vulns.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
- uses: actions/checkout@v3
1313
- uses: actions/setup-go@v3
1414
with:
15-
go-version: 1.19.5
15+
go-version-file: 'go.mod'
1616
- name: install depm
1717
run: go install github.com/goark/depm@latest
1818
- name: WriteGoList

.goreleaser.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ builds:
1515
- freebsd
1616
goarch:
1717
- amd64
18-
- arm
18+
- riscv64
1919
- arm64
2020
main: ./
2121
flags:
@@ -25,20 +25,20 @@ builds:
2525

2626
archives:
2727
-
28+
rlcp: true
2829
format: tar.gz
2930
format_overrides:
3031
- goos: windows
3132
format: zip
32-
name_template: '{{ .Binary }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}'
33-
replacements:
34-
amd64: 64bit
35-
386: 32bit
36-
arm: ARM
37-
arm64: ARM64
38-
darwin: macOS
39-
linux: Linux
40-
windows: Windows
41-
freebsd: FreeBSD
33+
name_template: >-
34+
{{ .ProjectName }}_
35+
{{ .Version }}_
36+
{{- title .Os }}_
37+
{{- if eq .Arch "amd64" }}64bit
38+
{{- else if eq .Arch "386" }}32bit
39+
{{- else if eq .Arch "arm64" }}ARM64
40+
{{- else if eq .Arch "riscv64" }}RICSV
41+
{{- else }}{{ .Arch }}{{ end }}
4242
files:
4343
- LICENSE*
4444
- README*

Taskfile.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@ tasks:
1111
build-all:
1212
desc: Build executable binary with GoReleaser.
1313
cmds:
14-
- goreleaser --snapshot --skip-publish --rm-dist
14+
- goreleaser --snapshot --skip-publish --clean
1515

1616
test:
1717
desc: Test and lint.
1818
cmds:
1919
- go mod verify
2020
- go test -shuffle on ./...
21-
- docker run --rm -v $(pwd):/app -w /app golangci/golangci-lint:v1.50.1 golangci-lint run --enable gosec --exclude "G501|G505" --timeout 3m0s ./...
21+
- docker run --rm -v $(pwd):/app -w /app golangci/golangci-lint:v1.51.1 golangci-lint run --enable gosec --exclude "G501|G505" --timeout 3m0s ./...
2222
sources:
2323
- ./go.mod
2424
- '**/*.go'
@@ -37,7 +37,7 @@ tasks:
3737
- rm -f ./go.sum
3838
- go clean -cache
3939
- go clean -modcache
40-
- go mod tidy -v -go=1.19
40+
- go mod tidy -v -go=1.20
4141

4242
graph:
4343
desc: Make grapth of dependency modules.

dependency.png

-105 Bytes
Loading

facade/hash.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import (
1414
"github.com/spf13/cobra"
1515
)
1616

17-
//newhashCmd returns cobra.Command instance for show sub-command
17+
// newhashCmd returns cobra.Command instance for show sub-command
1818
func newhashCmd(ui *rwi.RWI) *cobra.Command {
1919
hashCmd := &cobra.Command{
2020
Use: "hash [flags] [file]",
@@ -128,15 +128,15 @@ func (w warn) Error() string {
128128

129129
func appendHashError(wlist []*warn, err error) []*warn {
130130
if len(wlist) == 0 {
131-
return append(wlist, &warn{count: 1, err: errs.Cause(err)})
131+
return append(wlist, &warn{count: 1, err: err})
132132
}
133133
for i := 0; i < len(wlist); i++ {
134134
if errs.Is(err, wlist[i].err) {
135135
wlist[i].count++
136136
return wlist
137137
}
138138
}
139-
return append(wlist, &warn{count: 1, err: errs.Cause(err)})
139+
return append(wlist, &warn{count: 1, err: err})
140140
}
141141

142142
func hashChecks(checkers []hash.Checker, ui *rwi.RWI, ignoreMissingFlag, quietFlag bool) error {

go.mod

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
module github.com/goark/gnkf
22

3-
go 1.19
3+
go 1.20
44

55
require (
6-
github.com/goark/csvdata v0.7.2
7-
github.com/goark/errs v1.1.0
6+
github.com/goark/csvdata v0.7.3
7+
github.com/goark/errs v1.2.2
88
github.com/goark/gocli v0.12.0
9-
github.com/goark/kkconv v0.3.1
9+
github.com/goark/kkconv v0.3.3
1010
github.com/saintfish/chardet v0.0.0-20230101081208-5e3ef4b5456d
1111
github.com/spf13/cobra v1.6.1
12-
golang.org/x/crypto v0.5.0
13-
golang.org/x/text v0.6.0
12+
golang.org/x/crypto v0.6.0
13+
golang.org/x/text v0.7.0
1414
)
1515

1616
require (

go.sum

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
github.com/cpuguy83/go-md2man/v2 v2.0.2/go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o=
2-
github.com/goark/csvdata v0.7.2 h1:Tvm2dH5KbtLGOHcQrTJQcN463MN2yisnthvw+5ZmOXk=
3-
github.com/goark/csvdata v0.7.2/go.mod h1:lOUloLQLgMf5WUtYPXrJifbnZkb7uFezNgrJqG0T5SQ=
4-
github.com/goark/errs v1.1.0 h1:FKnyw4LVyRADIjM8Nj0Up6r0/y5cfADvZAd1E+tthXE=
5-
github.com/goark/errs v1.1.0/go.mod h1:TtaPEoadm2mzqzfXdkkfpN2xuniCFm2q4JH+c1qzaqw=
2+
github.com/goark/csvdata v0.7.3 h1:IkWPbaeIEVH6jEw0G18OTEPaE4s8RQN8a2k2ooDFx2g=
3+
github.com/goark/csvdata v0.7.3/go.mod h1:vhn11zhff8ORS4ZkiTJv/EHXOQqk29jKGo7MYL8Rp0I=
4+
github.com/goark/errs v1.2.2 h1:UrMZZJL0WaOzaO+ErSV+nz/k/+bmW2wUiFe5V7pUeEo=
5+
github.com/goark/errs v1.2.2/go.mod h1:ZsQucxaDFVfSB8I99j4bxkDRfNOrlKINwg72QMuRWKw=
66
github.com/goark/gocli v0.12.0 h1:Be44HJtGaRb++QjRNDPFhQ/BeapZzjz6CwlqFvBVpC4=
77
github.com/goark/gocli v0.12.0/go.mod h1:IqwaOFWHni1OZnOaqC3UpfAHQ/o321zm/Lvv13isR8w=
8-
github.com/goark/kkconv v0.3.1 h1:oUmPb7y8ymE1YuZtbZO1Mr2yiDQLEAWOI7l7wPpATsI=
9-
github.com/goark/kkconv v0.3.1/go.mod h1:5ZSIktoUG6t4IXG1OJZoM1R+SkfFVCxnDnVyDu0wVsE=
8+
github.com/goark/kkconv v0.3.3 h1:Cv9XBLbsqMEYRP2RKHOj9nxDxzLuEPgPn0/SJbi7N1U=
9+
github.com/goark/kkconv v0.3.3/go.mod h1:L16PcMzduVmw1ywyqFcpRhqadX75MT/af4RE2CSI210=
1010
github.com/inconshreveable/mousetrap v1.0.1 h1:U3uMjPSQEBMNp1lFxmllqCPM6P5u/Xq7Pgzkat/bFNc=
1111
github.com/inconshreveable/mousetrap v1.0.1/go.mod h1:vpF70FUmC8bwa3OWnCshd2FqLfsEA9PFc4w1p2J65bw=
1212
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
@@ -16,9 +16,9 @@ github.com/spf13/cobra v1.6.1 h1:o94oiPyS4KD1mPy2fmcYYHHfCxLqYjJOhGsCHFZtEzA=
1616
github.com/spf13/cobra v1.6.1/go.mod h1:IOw/AERYS7UzyrGinqmz6HLUo219MORXGxhbaJUqzrY=
1717
github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA=
1818
github.com/spf13/pflag v1.0.5/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
19-
golang.org/x/crypto v0.5.0 h1:U/0M97KRkSFvyD/3FSmdP5W5swImpNgle/EHFhOsQPE=
20-
golang.org/x/crypto v0.5.0/go.mod h1:NK/OQwhpMQP3MwtdjgLlYHnH9ebylxKWv3e0fK+mkQU=
21-
golang.org/x/text v0.6.0 h1:3XmdazWV+ubf7QgHSTWeykHOci5oeekaGJBLkrkaw4k=
22-
golang.org/x/text v0.6.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
19+
golang.org/x/crypto v0.6.0 h1:qfktjS5LUO+fFKeJXZ+ikTRijMmljikvG68fpMMruSc=
20+
golang.org/x/crypto v0.6.0/go.mod h1:OFC/31mSvZgRz0V1QTNCzfAI1aIRzbiufJtkMIlEp58=
21+
golang.org/x/text v0.7.0 h1:4BRB4x83lYWy72KwLD/qYDuTu7q9PjSagHvijDw7cLo=
22+
golang.org/x/text v0.7.0/go.mod h1:mrYo+phRRbMaCq/xk9113O4dZlRixOauAjOtrjsXDZ8=
2323
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
2424
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=

0 commit comments

Comments
 (0)