We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent afb7656 commit e7b9c82Copy full SHA for e7b9c82
1 file changed
pathmapping/pathmapping.go
@@ -5,17 +5,20 @@ var mapping = map[string]string{}
5
// PathMapping is a simple key store for class and proxy class mapping
6
type PathMapping struct{}
7
8
+// Set a path mapping
9
func (p *PathMapping) Set(path string, originalPath string) {
10
mapping[path] = originalPath
11
}
12
13
+// Get a path mapping
14
func (p *PathMapping) Get(path string) (string, bool) {
15
if p.Has(path) {
16
return mapping[path], true
17
18
return "", false
19
20
21
+// Has check if the path mapping exist
22
func (p *PathMapping) Has(path string) bool {
23
if _, exist := mapping[path]; exist {
24
return true
0 commit comments