Skip to content

Commit 50b9d71

Browse files
committed
updated ext lib
1 parent ace19ee commit 50b9d71

8 files changed

Lines changed: 34 additions & 16 deletions

File tree

.github/workflows/release.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@ jobs:
1818
- run: git fetch --force --tags
1919
- uses: actions/setup-go@v3
2020
with:
21-
go-version: '>=1.19.2'
21+
go-version: '>=1.22.2'
2222
cache: true
2323
- uses: goreleaser/goreleaser-action@v2
2424
with:
2525
distribution: goreleaser
2626
version: latest
27-
args: release --rm-dist
27+
args: release --clean
2828
env:
2929
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.golangci.yaml

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,30 @@
11
linters:
22
enable-all: true
33
disable:
4-
- forbidigo
5-
- funlen
4+
- deadcode
5+
- exhaustivestruct
6+
- exhaustruct
7+
- golint
8+
- ifshort
9+
- interfacer
610
- lll
7-
- gochecknoglobals
11+
- maligned
12+
- nosnakecase
813
- paralleltest
914
- scopelint
15+
- structcheck
1016
- testpackage
11-
- varnamelen
17+
- varcheck
18+
issues:
19+
exclude-rules:
20+
- path: _test.go
21+
linters:
22+
- funlen
23+
- varnamelen
24+
linters-settings:
25+
depguard:
26+
rules:
27+
main:
28+
allow:
29+
- $gostd
30+
- github.com/wakeful/yaml2json/pkg/parse

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# todo add to CI
22
repos:
33
- repo: https://github.com/pre-commit/pre-commit-hooks
4-
rev: v4.3.0
4+
rev: v4.6.0
55
hooks:
66
- id: check-case-conflict
77
- id: trailing-whitespace

go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
module github.com/wakeful/yaml2json
22

3-
go 1.19
3+
go 1.22
44

5-
require gopkg.in/yaml.v2 v2.4.0
5+
require gopkg.in/yaml.v3 v3.0.1

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM=
22
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
3-
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
4-
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
3+
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
4+
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=

pkg/parse/decode.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import (
44
"encoding/json"
55
"fmt"
66

7-
"gopkg.in/yaml.v2"
7+
"gopkg.in/yaml.v3"
88
)
99

1010
func decode(input interface{}) interface{} {

pkg/parse/decode_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,7 @@ bar:
116116

117117
return
118118
}
119+
119120
if got != tt.want {
120121
t.Errorf("ByteSliceToJSON() got = %v, want %v", got, tt.want)
121122
}

yaml2json.go

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,10 @@ import (
99
"github.com/wakeful/yaml2json/pkg/parse"
1010
)
1111

12-
var (
13-
showVersion = flag.Bool("version", false, "show version and exit")
14-
version = "dev"
15-
)
12+
var version = "dev"
1613

1714
func main() {
15+
showVersion := flag.Bool("version", false, "show version and exit")
1816
flag.Parse()
1917

2018
const url = "https://github.com/wakeful/yaml2json"

0 commit comments

Comments
 (0)