Skip to content

Commit aea2ecc

Browse files
authored
Merge pull request #15 from bitnami/ini-file-go1.18
Update to Go 1.18
2 parents ef80778 + 29fe407 commit aea2ecc

File tree

7 files changed

+15
-27
lines changed

7 files changed

+15
-27
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
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

Dockerfile

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,12 @@
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

1010
RUN 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-
2014
WORKDIR /go/src/app
2115
COPY . .
2216

Makefile

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
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

33
TOOL_NAME := ini-file
44

@@ -30,22 +30,17 @@ download:
3030

3131
get-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

3635
vet:
3736
@echo "+ Vet"
3837
@go vet ./...
3938

4039
lint:
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-
4944
test:
5045
@echo "+ Testing package"
5146
$(GO_TEST) .

cmd_test.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ type iniTestValue struct {
2121
type 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 {
3130
type iniGetTest struct {
3231
name string
3332
iniTestValue
34-
wantErr bool
3533
initialText string
36-
expectedText string
3734
createIniFile bool
3835
expectedErr interface{}
3936
}
4037

4138
type iniDelTest struct {
4239
name string
4340
values []iniTestValue
44-
wantErr bool
4541
initialText string
4642
expectedText string
4743
createIniFile bool

go.mod

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,19 @@
11
module github.com/bitnami/ini-file
22

3-
go 1.16
3+
go 1.18
44

55
require (
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
)

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACk
2424
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
2525
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
2626
golang.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=
2929
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
3030
golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
3131
gopkg.in/ini.v1 v1.62.0 h1:duBzk771uxoUuOlyRLkHsygud9+5lrlGjdFBb4mSKDU=

main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ type Options struct {
1515
var globalOpts = &Options{}
1616

1717
var (
18-
version = "1.4.0"
18+
version = "1.4.2"
1919
buildDate = ""
2020
commit = ""
2121
)

0 commit comments

Comments
 (0)