diff --git a/cli/error.go b/cli/error.go index 64174f19..3d7ced5b 100644 --- a/cli/error.go +++ b/cli/error.go @@ -9,8 +9,9 @@ import ( "strings" "unicode/utf8" - "github.com/itchyny/gojq" "github.com/mattn/go-runewidth" + + "github.com/itchyny/gojq" ) type emptyError struct { @@ -38,7 +39,7 @@ func (err *exitCodeError) Error() string { return "exit code: " + strconv.Itoa(err.code) } -func (err *exitCodeError) isEmptyError() {} +func (*exitCodeError) isEmptyError() {} func (err *exitCodeError) ExitCode() int { return err.code @@ -52,7 +53,7 @@ func (err *flagParseError) Error() string { return err.err.Error() } -func (err *flagParseError) ExitCode() int { +func (*flagParseError) ExitCode() int { return exitCodeFlagParseErr } @@ -64,7 +65,7 @@ func (err *compileError) Error() string { return "compile error: " + err.err.Error() } -func (err *compileError) ExitCode() int { +func (*compileError) ExitCode() int { return exitCodeCompileErr } @@ -88,7 +89,7 @@ func (err *queryParseError) Error() string { err.contents, linestr, column+1, '^', err.err) } -func (err *queryParseError) ExitCode() int { +func (*queryParseError) ExitCode() int { return exitCodeCompileErr } diff --git a/cli/inputs.go b/cli/inputs.go index 1f91c480..7a35dcdf 100644 --- a/cli/inputs.go +++ b/cli/inputs.go @@ -140,7 +140,7 @@ func (i *nullInputIter) Close() error { return nil } -func (i *nullInputIter) Name() string { +func (*nullInputIter) Name() string { return "" } diff --git a/error.go b/error.go index 09a70d39..18b06b1c 100644 --- a/error.go +++ b/error.go @@ -85,7 +85,7 @@ func (err *expectedStartEndError) Error() string { type lengthMismatchError struct{} -func (err *lengthMismatchError) Error() string { +func (*lengthMismatchError) Error() string { return "length mismatch" } @@ -222,7 +222,7 @@ func (err *joinTypeError) Error() string { type timeArrayError struct{} -func (err *timeArrayError) Error() string { +func (*timeArrayError) Error() string { return "expected an array of 8 numbers" } @@ -279,7 +279,7 @@ func (err *formatRowError) Error() string { type tooManyVariableValuesError struct{} -func (err *tooManyVariableValuesError) Error() string { +func (*tooManyVariableValuesError) Error() string { return "too many variable values provided" } @@ -316,7 +316,7 @@ func (err *breakError) Error() string { return "label not defined: " + err.n } -func (err *breakError) ExitCode() int { +func (*breakError) ExitCode() int { return 3 } diff --git a/release.go b/release.go index c34dfb45..07fc7167 100644 --- a/release.go +++ b/release.go @@ -5,12 +5,12 @@ package gojq type codeinfo struct{} -func (c *compiler) appendCodeInfo(any) {} +func (*compiler) appendCodeInfo(any) {} -func (c *compiler) deleteCodeInfo(string) {} +func (*compiler) deleteCodeInfo(string) {} -func (env *env) debugCodes() {} +func (*env) debugCodes() {} -func (env *env) debugState(int, bool) {} +func (*env) debugState(int, bool) {} -func (env *env) debugForks(int, string) {} +func (*env) debugForks(int, string) {}