1
0
mirror of https://github.com/go-micro/go-micro.git synced 2024-11-30 08:06:40 +02:00
go-micro/config/source/file/format.go
2019-05-30 23:11:13 +01:00

16 lines
238 B
Go

package file
import (
"strings"
"github.com/micro/go-micro/config/encoder"
)
func format(p string, e encoder.Encoder) string {
parts := strings.Split(p, ".")
if len(parts) > 1 {
return parts[len(parts)-1]
}
return e.String()
}