Skip to content

Commit

Permalink
Merge pull request #15 from bitnami/ini-file-go1.18
Browse files Browse the repository at this point in the history
Update to Go 1.18
  • Loading branch information
marcosbc authored May 19, 2022
2 parents ef80778 + 29fe407 commit aea2ecc
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 27 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: '^1.16.6' # The Go version to download (if necessary) and use.
go-version: '^1.18.2' # The Go version to download (if necessary) and use.
- name: Install Build Dependencies
run: make get-build-deps
- name: Download required modules
Expand Down
8 changes: 1 addition & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,12 @@
# docker run --rm -it -v /tmp:/tmp bitnami/ini-file del -k "title" -s "My book" /tmp/my.ini
#

FROM golang:1.16-stretch as build
FROM golang:1.18-stretch as build

RUN apt-get update && apt-get install -y --no-install-recommends \
git make upx \
&& rm -rf /var/lib/apt/lists/*

RUN go get -u \
golang.org/x/lint/golint \
golang.org/x/tools/cmd/goimports \
&& rm -rf $GOPATH/src/* && rm -rf $GOPATH/pkg/*


WORKDIR /go/src/app
COPY . .

Expand Down
11 changes: 3 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.PHONY: all build clean download get-build-deps vet lint get-deps test cover
.PHONY: all build clean download get-build-deps vet lint test cover

TOOL_NAME := ini-file

Expand Down Expand Up @@ -30,22 +30,17 @@ download:

get-build-deps:
@echo "+ Downloading build dependencies"
@go get golang.org/x/tools/cmd/goimports
@go get golang.org/x/lint/golint
@go install honnef.co/go/tools/cmd/staticcheck@latest

vet:
@echo "+ Vet"
@go vet ./...

lint:
@echo "+ Linting package"
@golint .
@staticcheck ./...
$(call fmtcheck, .)

get-deps:
@echo "+ Downloading dependencies"
@go get -d -t ./...

test:
@echo "+ Testing package"
$(GO_TEST) .
Expand Down
4 changes: 0 additions & 4 deletions cmd_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ type iniTestValue struct {
type iniSetTest struct {
name string
values []iniTestValue
wantErr bool
initialText string
expectedText string
createIniFile bool
Expand All @@ -31,17 +30,14 @@ type iniSetTest struct {
type iniGetTest struct {
name string
iniTestValue
wantErr bool
initialText string
expectedText string
createIniFile bool
expectedErr interface{}
}

type iniDelTest struct {
name string
values []iniTestValue
wantErr bool
initialText string
expectedText string
createIniFile bool
Expand Down
11 changes: 7 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
module github.com/bitnami/ini-file

go 1.16
go 1.18

require (
github.com/bitnami/gonit v0.2.0
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/go-ini/ini v1.62.0
github.com/jessevdk/go-flags v1.5.0
github.com/juamedgod/cliassert v0.0.0-20180320011200-425256f2bb0b
github.com/stretchr/testify v1.2.2
)

require (
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/smartystreets/goconvey v1.6.4 // indirect
github.com/stretchr/testify v1.2.2
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c // indirect
golang.org/x/sys v0.0.0-20211019181941-9d821ace8654 // indirect
gopkg.in/ini.v1 v1.62.0 // indirect
)
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACk
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c h1:F1jZWGFhYfh0Ci55sIpILtKKK8p3i2/krTr0H1rg74I=
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.0.0-20211019181941-9d821ace8654 h1:id054HUawV2/6IGm2IV8KZQjqtwAOo2CYlOToYqa0d0=
golang.org/x/sys v0.0.0-20211019181941-9d821ace8654/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
gopkg.in/ini.v1 v1.62.0 h1:duBzk771uxoUuOlyRLkHsygud9+5lrlGjdFBb4mSKDU=
Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type Options struct {
var globalOpts = &Options{}

var (
version = "1.4.0"
version = "1.4.2"
buildDate = ""
commit = ""
)
Expand Down

0 comments on commit aea2ecc

Please sign in to comment.