Skip to content

Commit

Permalink
Merge pull request #11 from nqd/github-workflow
Browse files Browse the repository at this point in the history
github actions
  • Loading branch information
nqd authored Sep 29, 2021
2 parents f7bbbfb + 0ba30a0 commit 1841481
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 25 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: build
on: [push, pull_request]

jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:

- name: Set up Go 1.16
uses: actions/setup-go@v2
with:
go-version: ^1.16
id: go

- name: Check out code
uses: actions/checkout@v2

- name: Install deps
shell: bash --noprofile --norc -x -eo pipefail {0}
run: |
go get -u honnef.co/go/tools/cmd/staticcheck
go get -u github.com/client9/misspell/cmd/misspell
- name: Lint
shell: bash --noprofile --norc -x -eo pipefail {0}
run: |
$(exit $(go fmt ./... | wc -l))
misspell -error -locale US .
staticcheck ./...
- name: Test
run: |
go test -race ./...
23 changes: 0 additions & 23 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion flat.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ func unflatten(flat map[string]interface{}, opts *Options) (nested map[string]in

for k, v := range flat {
temp := uf(k, v, opts).(map[string]interface{})
err = mergo.Merge(&nested, temp, func(c *mergo.Config) {c.Overwrite = true})
err = mergo.Merge(&nested, temp, func(c *mergo.Config) { c.Overwrite = true })
if err != nil {
return
}
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module github.com/nqd/flat

go 1.12
go 1.16

require github.com/imdario/mergo v0.3.12

0 comments on commit 1841481

Please sign in to comment.