go_sysutils/fsutils/funcs.go
brent saner eefe02afaf
v1.11.0
ADDED:
* fsutils: better/additional fsattrs functionality
* paths: highly filterable filesystem searching
2024-11-16 01:28:24 -05:00

17 lines
285 B
Go

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
}