Skip to content

Commit 106a704

Browse files
committed
support go 1.14 and above
1 parent 15e08cd commit 106a704

File tree

3 files changed

+16
-9
lines changed

3 files changed

+16
-9
lines changed

.github/workflows/go.yml

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,17 @@ on:
99
jobs:
1010
test:
1111
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
go: [ '1.14', '1.16', '1.18']
15+
name: Go ${{ matrix.go }}
1216
steps:
13-
- uses: actions/checkout@v2
17+
- uses: actions/checkout@v3
1418

15-
- name: Setup Go
16-
uses: actions/setup-go@v2
17-
with:
18-
go-version: 1.18
19-
20-
- name: Run Tests
21-
run: go test -v ./...
19+
- name: Setup Go
20+
uses: actions/setup-go@v3
21+
with:
22+
go-version: ${{ matrix.go }}
23+
24+
- name: Run Tests
25+
run: go test -v ./...

configurator.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ import (
1010
"strings"
1111
)
1212

13+
// for backwards compatability with go versions <1.18
14+
type any interface{}
15+
1316
type Configurator interface {
1417
GetEnvInt(field string) int
1518
GetEnvString(field string) string

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module github.com/bjubes/config
22

3-
go 1.18
3+
go 1.14

0 commit comments

Comments
 (0)