Codebase list golang-github-gobuffalo-packr / a28d1564-de24-492b-8e37-50745921626d/main v2 / file / resolver / ident.go
a28d1564-de24-492b-8e37-50745921626d/main

Tree @a28d1564-de24-492b-8e37-50745921626d/main (Download .tar.gz)

ident.go @a28d1564-de24-492b-8e37-50745921626d/mainraw · history · blame

package resolver

import (
	"path/filepath"
	"runtime"
	"strings"
)

func Key(s string) string {
	s = strings.Replace(s, "\\", "/", -1)
	return s
}

func OsPath(s string) string {
	if runtime.GOOS == "windows" {
		s = strings.Replace(s, "/", string(filepath.Separator), -1)
	} else {
		s = strings.Replace(s, "\\", string(filepath.Separator), -1)
	}
	return s
}