File tree Expand file tree Collapse file tree 7 files changed +15
-27
lines changed Expand file tree Collapse file tree 7 files changed +15
-27
lines changed Original file line number Diff line number Diff line change 2727 - uses : actions/checkout@v2
2828 - uses : actions/setup-go@v2
2929 with :
30- go-version : ' ^1.16.6 ' # The Go version to download (if necessary) and use.
30+ go-version : ' ^1.18.2 ' # The Go version to download (if necessary) and use.
3131 - name : Install Build Dependencies
3232 run : make get-build-deps
3333 - name : Download required modules
Original file line number Diff line number Diff line change 55# docker run --rm -it -v /tmp:/tmp bitnami/ini-file del -k "title" -s "My book" /tmp/my.ini
66#
77
8- FROM golang:1.16 -stretch as build
8+ FROM golang:1.18 -stretch as build
99
1010RUN apt-get update && apt-get install -y --no-install-recommends \
1111 git make upx \
1212 && rm -rf /var/lib/apt/lists/*
1313
14- RUN go get -u \
15- golang.org/x/lint/golint \
16- golang.org/x/tools/cmd/goimports \
17- && rm -rf $GOPATH/src/* && rm -rf $GOPATH/pkg/*
18-
19-
2014WORKDIR /go/src/app
2115COPY . .
2216
Original file line number Diff line number Diff line change 1- .PHONY : all build clean download get-build-deps vet lint get-deps test cover
1+ .PHONY : all build clean download get-build-deps vet lint test cover
22
33TOOL_NAME := ini-file
44
@@ -30,22 +30,17 @@ download:
3030
3131get-build-deps :
3232 @echo " + Downloading build dependencies"
33- @go get golang.org/x/tools/cmd/goimports
34- @go get golang.org/x/lint/golint
33+ @go install honnef.co/go/tools/cmd/staticcheck@latest
3534
3635vet :
3736 @echo " + Vet"
3837 @go vet ./...
3938
4039lint :
4140 @echo " + Linting package"
42- @golint .
41+ @staticcheck ./.. .
4342 $(call fmtcheck, .)
4443
45- get-deps :
46- @echo " + Downloading dependencies"
47- @go get -d -t ./...
48-
4944test :
5045 @echo " + Testing package"
5146 $(GO_TEST ) .
Original file line number Diff line number Diff line change @@ -21,7 +21,6 @@ type iniTestValue struct {
2121type iniSetTest struct {
2222 name string
2323 values []iniTestValue
24- wantErr bool
2524 initialText string
2625 expectedText string
2726 createIniFile bool
@@ -31,17 +30,14 @@ type iniSetTest struct {
3130type iniGetTest struct {
3231 name string
3332 iniTestValue
34- wantErr bool
3533 initialText string
36- expectedText string
3734 createIniFile bool
3835 expectedErr interface {}
3936}
4037
4138type iniDelTest struct {
4239 name string
4340 values []iniTestValue
44- wantErr bool
4541 initialText string
4642 expectedText string
4743 createIniFile bool
Original file line number Diff line number Diff line change 11module github.com/bitnami/ini-file
22
3- go 1.16
3+ go 1.18
44
55require (
66 github.com/bitnami/gonit v0.2.0
7- github.com/davecgh/go-spew v1.1.1 // indirect
87 github.com/go-ini/ini v1.62.0
98 github.com/jessevdk/go-flags v1.5.0
109 github.com/juamedgod/cliassert v0.0.0-20180320011200-425256f2bb0b
10+ github.com/stretchr/testify v1.2.2
11+ )
12+
13+ require (
14+ github.com/davecgh/go-spew v1.1.1 // indirect
1115 github.com/pmezard/go-difflib v1.0.0 // indirect
1216 github.com/smartystreets/goconvey v1.6.4 // indirect
13- github.com/stretchr/testify v1.2.2
14- golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c // indirect
17+ golang.org/x/sys v0.0.0-20211019181941-9d821ace8654 // indirect
1518 gopkg.in/ini.v1 v1.62.0 // indirect
1619)
Original file line number Diff line number Diff line change @@ -24,8 +24,8 @@ golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACk
2424golang.org/x/net v0.0.0-20190311183353-d8887717615a /go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg =
2525golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a /go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY =
2626golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4 /go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs =
27- golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c h1:F1jZWGFhYfh0Ci55sIpILtKKK8p3i2/krTr0H1rg74I =
28- golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c /go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg =
27+ golang.org/x/sys v0.0.0-20211019181941-9d821ace8654 h1:id054HUawV2/6IGm2IV8KZQjqtwAOo2CYlOToYqa0d0 =
28+ golang.org/x/sys v0.0.0-20211019181941-9d821ace8654 /go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg =
2929golang.org/x/text v0.3.0 /go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ =
3030golang.org/x/tools v0.0.0-20190328211700-ab21143f2384 /go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs =
3131gopkg.in/ini.v1 v1.62.0 h1:duBzk771uxoUuOlyRLkHsygud9+5lrlGjdFBb4mSKDU =
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ type Options struct {
1515var globalOpts = & Options {}
1616
1717var (
18- version = "1.4.0 "
18+ version = "1.4.2 "
1919 buildDate = ""
2020 commit = ""
2121)
You can’t perform that action at this time.
0 commit comments