Skip to content

Commit

Permalink
Rename function for new return value
Browse files Browse the repository at this point in the history
  • Loading branch information
dnephin committed Sep 25, 2022
1 parent ddad04c commit f6fe867
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ linters-settings:
lll:
line-length: 100
maintidx:
under: 40
under: 45

issues:
exclude-use-default: false
Expand Down
4 changes: 2 additions & 2 deletions internal/source/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ func UpdateExpectedValue(stackIndex int, x, y interface{}) error {
return ErrNotFound
}

argIndex, ident := getVarNameForExpectedValueArg(expr)
argIndex, ident := getIdentForExpectedValueArg(expr)
if argIndex < 0 || ident == nil {
debug("no arguments started with the word 'expected': %v",
debugFormatNode{Node: &ast.CallExpr{Args: expr}})
Expand Down Expand Up @@ -138,7 +138,7 @@ func UpdateVariable(
return nil
}

func getVarNameForExpectedValueArg(expr []ast.Expr) (int, *ast.Ident) {
func getIdentForExpectedValueArg(expr []ast.Expr) (int, *ast.Ident) {
for i := 1; i < 3; i++ {
switch e := expr[i].(type) {
case *ast.Ident:
Expand Down

0 comments on commit f6fe867

Please sign in to comment.