Skip to content

Commit

Permalink
Merge pull request #250 from ccoVeille/useless-receivers
Browse files Browse the repository at this point in the history
remove useless receivers
  • Loading branch information
itchyny committed Apr 5, 2024
2 parents 976241f + 375e90d commit 3a675cc
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 15 deletions.
11 changes: 6 additions & 5 deletions cli/error.go
Expand Up @@ -9,8 +9,9 @@ import (
"strings"
"unicode/utf8"

"github.com/itchyny/gojq"
"github.com/mattn/go-runewidth"

"github.com/itchyny/gojq"
)

type emptyError struct {
Expand Down Expand Up @@ -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
Expand All @@ -52,7 +53,7 @@ func (err *flagParseError) Error() string {
return err.err.Error()
}

func (err *flagParseError) ExitCode() int {
func (*flagParseError) ExitCode() int {
return exitCodeFlagParseErr
}

Expand All @@ -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
}

Expand All @@ -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
}

Expand Down
2 changes: 1 addition & 1 deletion cli/inputs.go
Expand Up @@ -140,7 +140,7 @@ func (i *nullInputIter) Close() error {
return nil
}

func (i *nullInputIter) Name() string {
func (*nullInputIter) Name() string {
return ""
}

Expand Down
8 changes: 4 additions & 4 deletions error.go
Expand Up @@ -85,7 +85,7 @@ func (err *expectedStartEndError) Error() string {

type lengthMismatchError struct{}

func (err *lengthMismatchError) Error() string {
func (*lengthMismatchError) Error() string {
return "length mismatch"
}

Expand Down Expand Up @@ -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"
}

Expand Down Expand Up @@ -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"
}

Expand Down Expand Up @@ -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
}

Expand Down
10 changes: 5 additions & 5 deletions release.go
Expand Up @@ -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) {}

0 comments on commit 3a675cc

Please sign in to comment.