Skip to content

Commit

Permalink
fix: Fix comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
erikgeiser committed Nov 6, 2020
1 parent 3ae9006 commit e2f9e80
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions prefix.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
"github.com/gobwas/glob/syntax/lexer"
)

// staticPrefix returns the filepath up to the
// first path element that contains a wildcard.
// staticPrefix returns the file path inside the pattern up
// to the first path element that contains a wildcard.
func staticPrefix(pattern string) (string, error) {
parts := strings.Split(pattern, string(filepath.Separator))

Expand All @@ -32,6 +32,7 @@ func staticPrefix(pattern string) (string, error) {
nChildren := len(rootNode.Children)

if nChildren > 1 {
// this pattern is not static
break
}

Expand Down

0 comments on commit e2f9e80

Please sign in to comment.