gitee.com/liuxuezhan/go-micro-v1.18.0@v1.0.0/config/source/file/format.go (about) 1 package file 2 3 import ( 4 "strings" 5 6 "gitee.com/liuxuezhan/go-micro-v1.18.0/config/encoder" 7 ) 8 9 func format(p string, e encoder.Encoder) string { 10 parts := strings.Split(p, ".") 11 if len(parts) > 1 { 12 return parts[len(parts)-1] 13 } 14 return e.String() 15 }