serviceman/vendor/github.com/UnnoTed/fileb0x/file/methods_windows.go

19 lines
411 B
Go

package file
import "strings"
// GetRemap returns a map's params with
// info required to load files directly
// from the hard drive when using prefix
// and base while debug mode is activaTed
func (f *File) GetRemap() string {
if f.Base == "" && f.Prefix == "" {
return ""
}
return `"` + strings.Replace(f.Path, `\`, `\\`, -1) + `": {
"prefix": "` + f.Prefix + `",
"base": "` + f.Base + `",
},`
}