17 lines
285 B
Go
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
|
||
|
}
|