Skip to content

Commit

Permalink
fix: 抜けてたので追加
Browse files Browse the repository at this point in the history
  • Loading branch information
xztaityozx committed Dec 9, 2024
1 parent 91f9b0b commit dd6443b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions internal/iterator/iterator.go
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ type RegexpIterator struct {

func (r *RegexpIterator) ElementAt(idx int) (string, error) {
if idx == 0 {
return "", fmt.Errorf(IndexOutOfRange)
return "", errors.New(IndexOutOfRange)
}

if idx > 0 {
Expand All @@ -285,7 +285,7 @@ func (r *RegexpIterator) ElementAt(idx int) (string, error) {
}
}

return "", fmt.Errorf(IndexOutOfRange)
return "", errors.New(IndexOutOfRange)
} else {
// 負のインデックス指定されたとき
// rightmostなIndexの検索ができないので残りの文字列をすべて分割してしまう
Expand Down Expand Up @@ -330,7 +330,7 @@ func (r *RegexpIterator) ElementAt(idx int) (string, error) {
return s, nil
}

return "", fmt.Errorf(IndexOutOfRange)
return "", errors.New(IndexOutOfRange)
}
}

Expand Down

0 comments on commit dd6443b

Please sign in to comment.