Skip to content

Commit

Permalink
fix: linter issues
Browse files Browse the repository at this point in the history
Signed-off-by: Carlos A Becker <caarlos0@gmail.com>
  • Loading branch information
caarlos0 committed Feb 10, 2022
1 parent b6ef6d9 commit 7e1d66d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion glob_test.go
Expand Up @@ -17,7 +17,7 @@ import (
"github.com/matryer/is"
)

func TestGlob(t *testing.T) { // nolint:funlen
func TestGlob(t *testing.T) { // nolint:funlen,maintidx
t.Parallel()
t.Run("real", func(t *testing.T) {
t.Parallel()
Expand Down
6 changes: 5 additions & 1 deletion prefix.go
Expand Up @@ -47,7 +47,11 @@ func staticText(node *ast.Node) (text string, ok bool) {

return text, true
case ast.KindText:
return node.Value.(ast.Text).Text, true
t, ok := node.Value.(ast.Text)
if !ok {
return "", false
}
return t.Text, true
case ast.KindNothing:
return "", true
default:
Expand Down

0 comments on commit 7e1d66d

Please sign in to comment.