Skip to content

Commit 1841481

Browse files
authored
Merge pull request #11 from nqd/github-workflow
github actions
2 parents f7bbbfb + 0ba30a0 commit 1841481

File tree

4 files changed

+36
-25
lines changed

4 files changed

+36
-25
lines changed

.github/workflows/test.yml

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: build
2+
on: [push, pull_request]
3+
4+
jobs:
5+
test:
6+
name: Test
7+
runs-on: ubuntu-latest
8+
steps:
9+
10+
- name: Set up Go 1.16
11+
uses: actions/setup-go@v2
12+
with:
13+
go-version: ^1.16
14+
id: go
15+
16+
- name: Check out code
17+
uses: actions/checkout@v2
18+
19+
- name: Install deps
20+
shell: bash --noprofile --norc -x -eo pipefail {0}
21+
run: |
22+
go get -u honnef.co/go/tools/cmd/staticcheck
23+
go get -u github.com/client9/misspell/cmd/misspell
24+
25+
- name: Lint
26+
shell: bash --noprofile --norc -x -eo pipefail {0}
27+
run: |
28+
$(exit $(go fmt ./... | wc -l))
29+
misspell -error -locale US .
30+
staticcheck ./...
31+
32+
- name: Test
33+
run: |
34+
go test -race ./...

.travis.yml

-23
This file was deleted.

flat.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ func unflatten(flat map[string]interface{}, opts *Options) (nested map[string]in
113113

114114
for k, v := range flat {
115115
temp := uf(k, v, opts).(map[string]interface{})
116-
err = mergo.Merge(&nested, temp, func(c *mergo.Config) {c.Overwrite = true})
116+
err = mergo.Merge(&nested, temp, func(c *mergo.Config) { c.Overwrite = true })
117117
if err != nil {
118118
return
119119
}

go.mod

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module github.com/nqd/flat
22

3-
go 1.12
3+
go 1.16
44

55
require github.com/imdario/mergo v0.3.12

0 commit comments

Comments
 (0)