88 "github.com/devstream-io/devstream/pkg/util/log"
99)
1010
11- // DirFIleFilterFunc is used to filter files when walk directory
11+ // DirFileFilterFunc is used to filter files when walk directory
1212// if this func return false, this file's content will not return
13- type DirFIleFilterFunc func (filePath string , isDir bool ) bool
13+ type DirFileFilterFunc func (filePath string , isDir bool ) bool
1414
1515// DirFileContentFunc is used to get file content then return this content
1616type DirFileContentFunc func (filePath string ) ([]byte , error )
@@ -21,7 +21,7 @@ type DirFileNameFunc func(filePath, srcPath string) string
2121
2222// GetFileMapByWalkDir will walk in directory return contentMap
2323func GetFileMapByWalkDir (
24- srcPath string , filterFunc DirFIleFilterFunc , fileNameFunc DirFileNameFunc , processFunc DirFileContentFunc ,
24+ srcPath string , filterFunc DirFileFilterFunc , fileNameFunc DirFileNameFunc , processFunc DirFileContentFunc ,
2525) (map [string ][]byte , error ) {
2626 contentMap := make (map [string ][]byte )
2727 if err := filepath .Walk (srcPath , func (path string , info fs.FileInfo , err error ) error {
@@ -54,7 +54,7 @@ func GetFileMapByWalkDir(
5454// if srcPath is a directory, it will invoke GetFileMapByWalkDir to get content map
5555// if srcPath is a file, it will use fileNameFunc and fileContentFunc to create a map
5656func GetFileMap (
57- srcPath string , filterFunc DirFIleFilterFunc , fileNameFunc DirFileNameFunc , fileContentFunc DirFileContentFunc ,
57+ srcPath string , filterFunc DirFileFilterFunc , fileNameFunc DirFileNameFunc , fileContentFunc DirFileContentFunc ,
5858) (map [string ][]byte , error ) {
5959 pathInfo , err := os .Stat (srcPath )
6060 if err != nil {
0 commit comments