@@ -16,27 +16,27 @@ import (
16
16
17
17
// Locale reads the content of a specific locale from static/bindata or custom path.
18
18
func Locale (name string ) ([]byte , error ) {
19
- return fileFromDir (path .Join ("locale" , name ))
19
+ return fileFromDir (path .Join ("locale" , path . Clean ( "/" + name ) ))
20
20
}
21
21
22
22
// Readme reads the content of a specific readme from static/bindata or custom path.
23
23
func Readme (name string ) ([]byte , error ) {
24
- return fileFromDir (path .Join ("readme" , name ))
24
+ return fileFromDir (path .Join ("readme" , path . Clean ( "/" + name ) ))
25
25
}
26
26
27
27
// Gitignore reads the content of a gitignore locale from static/bindata or custom path.
28
28
func Gitignore (name string ) ([]byte , error ) {
29
- return fileFromDir (path .Join ("gitignore" , name ))
29
+ return fileFromDir (path .Join ("gitignore" , path . Clean ( "/" + name ) ))
30
30
}
31
31
32
32
// License reads the content of a specific license from static/bindata or custom path.
33
33
func License (name string ) ([]byte , error ) {
34
- return fileFromDir (path .Join ("license" , name ))
34
+ return fileFromDir (path .Join ("license" , path . Clean ( "/" + name ) ))
35
35
}
36
36
37
37
// Labels reads the content of a specific labels from static/bindata or custom path.
38
38
func Labels (name string ) ([]byte , error ) {
39
- return fileFromDir (path .Join ("label" , name ))
39
+ return fileFromDir (path .Join ("label" , path . Clean ( "/" + name ) ))
40
40
}
41
41
42
42
// WalkLocales reads the content of a specific locale
0 commit comments