Skip to content

Commit

Permalink
use errors.New
Browse files Browse the repository at this point in the history
  • Loading branch information
goccy committed Dec 7, 2024
1 parent 148c8db commit 26733e1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scanner/context.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package scanner

import (
"fmt"
"errors"
"strconv"
"strings"
"sync"
Expand Down Expand Up @@ -137,7 +137,7 @@ func (c *Context) validateDocumentLineIndentAfterSpaceOnly(column int) error {
return nil
}
if c.docSpaceOnlyIndentColumn > column {
return fmt.Errorf("invalid number of indent is specified after space only")
return errors.New("invalid number of indent is specified after space only")
}
return nil
}
Expand All @@ -147,7 +147,7 @@ func (c *Context) validateDocumentLineIndentColumn() error {
return nil
}
if c.docFirstLineIndentColumn > c.docLineIndentColumn {
return fmt.Errorf("invalid number of indent is specified in the document header")
return errors.New("invalid number of indent is specified in the document header")
}
return nil
}
Expand Down

0 comments on commit 26733e1

Please sign in to comment.