Skip to content

Commit

Permalink
chore: add func doc for utils.IsHidden()
Browse files Browse the repository at this point in the history
  • Loading branch information
tjhop committed Oct 21, 2024
1 parent 09b66ad commit 35675ad
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/utils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,9 @@ func GetHostname() string {
return h
}

// IsHidden is a convenience function to check if a file/directory is hidden.
// It returns true if the file/directory name begins with a ".", and false
// otherwise.
func IsHidden(path string) bool {
return strings.HasPrefix(path, ".")
}
Expand Down

0 comments on commit 35675ad

Please sign in to comment.