Skip to content

Commit e7b9c82

Browse files
committed
[TASK] Add documentation comment in pathmapping module
1 parent afb7656 commit e7b9c82

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

pathmapping/pathmapping.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,20 @@ var mapping = map[string]string{}
55
// PathMapping is a simple key store for class and proxy class mapping
66
type PathMapping struct{}
77

8+
// Set a path mapping
89
func (p *PathMapping) Set(path string, originalPath string) {
910
mapping[path] = originalPath
1011
}
1112

13+
// Get a path mapping
1214
func (p *PathMapping) Get(path string) (string, bool) {
1315
if p.Has(path) {
1416
return mapping[path], true
1517
}
1618
return "", false
1719
}
1820

21+
// Has check if the path mapping exist
1922
func (p *PathMapping) Has(path string) bool {
2023
if _, exist := mapping[path]; exist {
2124
return true

0 commit comments

Comments
 (0)