Codebase list golang-github-gobuffalo-packr / b8a613c1-3ce0-492c-abc4-23feff4bcce9/upstream v2 / file / resolver / ident.go
b8a613c1-3ce0-492c-abc4-23feff4bcce9/upstream

Tree @b8a613c1-3ce0-492c-abc4-23feff4bcce9/upstream (Download .tar.gz)

ident.go @b8a613c1-3ce0-492c-abc4-23feff4bcce9/upstreamraw · 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
}