Skip to content

Commit c2f3f71

Browse files
committed
rename AtFirst to HasPrefix
1 parent dc2303d commit c2f3f71

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

configparser.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ func (p *ConfigParser) ParseReader(in io.Reader) error {
223223
line := strings.TrimFunc(string(l), unicode.IsSpace) // ensures sectionHeader regex will match
224224

225225
// Skip comment lines and empty lines
226-
if p.opt.commentPrefixes.AtFirst(line) || line == "" {
226+
if p.opt.commentPrefixes.HasPrefix(line) || line == "" {
227227
continue
228228
}
229229

options.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ type ConvertFunc func(string) (any, error)
4141
// Prefixes stores available prefixes for comments.
4242
type Prefixes []string
4343

44-
// AtFirst checks if str starts with any of the prefixes.
45-
func (pr Prefixes) AtFirst(str string) bool {
44+
// HasPrefix checks if str starts with any of the prefixes.
45+
func (pr Prefixes) HasPrefix(str string) bool {
4646
for _, p := range pr {
4747
if strings.HasPrefix(str, p) {
4848
return true

0 commit comments

Comments
 (0)