Skip to content

Commit

Permalink
feat: add IsHidden func to util pkg
Browse files Browse the repository at this point in the history
  • Loading branch information
tjhop committed Oct 13, 2023
1 parent 0db5422 commit 9acff3a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/utils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"io/fs"
"os"
"path/filepath"
"strings"
)

// GetFilesInDirectory is a convenience function to DRY out some of the
Expand Down Expand Up @@ -77,3 +78,7 @@ func GetHostname() string {
h, _ := os.Hostname()
return h
}

func IsHidden(path string) bool {
return strings.HasPrefix(path, ".")
}

0 comments on commit 9acff3a

Please sign in to comment.