aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/github.com/breml/errchkjson
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/breml/errchkjson')
-rw-r--r--vendor/github.com/breml/errchkjson/.goreleaser.yml15
-rw-r--r--vendor/github.com/breml/errchkjson/errchkjson.go20
2 files changed, 18 insertions, 17 deletions
diff --git a/vendor/github.com/breml/errchkjson/.goreleaser.yml b/vendor/github.com/breml/errchkjson/.goreleaser.yml
index 5f23690f1..a05c172cb 100644
--- a/vendor/github.com/breml/errchkjson/.goreleaser.yml
+++ b/vendor/github.com/breml/errchkjson/.goreleaser.yml
@@ -14,13 +14,14 @@ builds:
- windows
- darwin
archives:
- - name_template: "{{ .Binary }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
- replacements:
- darwin: Darwin
- linux: Linux
- windows: Windows
- 386: i386
- amd64: x86_64
+ - name_template: >-
+ {{- .Binary }}_
+ {{- .Version }}_
+ {{- title .Os }}_
+ {{- if eq .Arch "amd64" }}x86_64
+ {{- else if eq .Arch "386" }}i386
+ {{- else }}{{ .Arch }}{{ end }}
+ {{- if .Arm }}v{{ .Arm }}{{ end -}}
snapshot:
name_template: "{{ .Tag }}-next"
changelog:
diff --git a/vendor/github.com/breml/errchkjson/errchkjson.go b/vendor/github.com/breml/errchkjson/errchkjson.go
index 746709c76..4a23929cf 100644
--- a/vendor/github.com/breml/errchkjson/errchkjson.go
+++ b/vendor/github.com/breml/errchkjson/errchkjson.go
@@ -308,14 +308,14 @@ func (e *errchkjson) inspectArgs(pass *analysis.Pass, args []ast.Expr) {
}
// Construct *types.Interface for interface encoding.TextMarshaler
-// type TextMarshaler interface {
-// MarshalText() (text []byte, err error)
-// }
//
+// type TextMarshaler interface {
+// MarshalText() (text []byte, err error)
+// }
func textMarshalerInterface() *types.Interface {
textMarshalerInterface := types.NewInterfaceType([]*types.Func{
- types.NewFunc(token.NoPos, nil, "MarshalText", types.NewSignature(
- nil, nil, types.NewTuple(
+ types.NewFunc(token.NoPos, nil, "MarshalText", types.NewSignatureType(
+ nil, nil, nil, nil, types.NewTuple(
types.NewVar(token.NoPos, nil, "text",
types.NewSlice(
types.Universe.Lookup("byte").Type())),
@@ -328,14 +328,14 @@ func textMarshalerInterface() *types.Interface {
}
// Construct *types.Interface for interface json.Marshaler
-// type Marshaler interface {
-// MarshalJSON() ([]byte, error)
-// }
//
+// type Marshaler interface {
+// MarshalJSON() ([]byte, error)
+// }
func jsonMarshalerInterface() *types.Interface {
textMarshalerInterface := types.NewInterfaceType([]*types.Func{
- types.NewFunc(token.NoPos, nil, "MarshalJSON", types.NewSignature(
- nil, nil, types.NewTuple(
+ types.NewFunc(token.NoPos, nil, "MarshalJSON", types.NewSignatureType(
+ nil, nil, nil, nil, types.NewTuple(
types.NewVar(token.NoPos, nil, "",
types.NewSlice(
types.Universe.Lookup("byte").Type())),