2
0
mirror of https://git.coolaj86.com/coolaj86/go-watchdog.git synced 2025-12-25 05:38:41 +00:00
2019-06-24 20:00:11 -06:00

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 + `",
},`
}