v1.11.0
ADDED: * fsutils: better/additional fsattrs functionality * paths: highly filterable filesystem searching
This commit is contained in:
16
fsutils/funcs.go
Normal file
16
fsutils/funcs.go
Normal file
@@ -0,0 +1,16 @@
|
||||
package fsutils
|
||||
|
||||
// invertMap returns some handy consts remapping for easier lookups.
|
||||
func invertMap(origMap map[string]fsAttr) (newMap map[fsAttr]string) {
|
||||
|
||||
if origMap == nil {
|
||||
return
|
||||
}
|
||||
newMap = make(map[fsAttr]string)
|
||||
|
||||
for k, v := range origMap {
|
||||
newMap[v] = k
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
Reference in New Issue
Block a user