We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5617ff3 commit a0a243dCopy full SHA for a0a243d
config/file/format.go
@@ -3,8 +3,8 @@ package file
3
import "strings"
4
5
func format(name string) string {
6
- if p := strings.Split(name, "."); len(p) > 1 {
7
- return p[len(p)-1]
+ if idx := strings.LastIndex(name, "."); idx >= 0 {
+ return name[idx+1:]
8
}
9
return ""
10
0 commit comments