mirror of
https://github.com/go-micro/go-micro.git
synced 2024-12-18 08:26:38 +02:00
d94936f6c9
* v3 * revert plugins * fixup some issues
16 lines
240 B
Go
16 lines
240 B
Go
package file
|
|
|
|
import (
|
|
"strings"
|
|
|
|
"github.com/asim/go-micro/v3/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()
|
|
}
|