2021-06-19 16:00:47 +03:00
|
|
|
package flag
|
|
|
|
|
|
|
|
import (
|
2021-10-26 23:25:18 +03:00
|
|
|
"go.unistack.org/micro/v3/config"
|
2021-06-19 16:00:47 +03:00
|
|
|
)
|
|
|
|
|
|
|
|
type sliceDelimKey struct{}
|
|
|
|
|
|
|
|
// SliceDelim set the slice delimeter
|
|
|
|
func SliceDelim(s string) config.Option {
|
|
|
|
return config.SetOption(sliceDelimKey{}, s)
|
|
|
|
}
|
|
|
|
|
|
|
|
type mapDelimKey struct{}
|
|
|
|
|
|
|
|
// MapDelim set the map delimeter
|
|
|
|
func MapDelim(s string) config.Option {
|
|
|
|
return config.SetOption(mapDelimKey{}, s)
|
|
|
|
}
|
|
|
|
|
|
|
|
type timeFormatKey struct{}
|
|
|
|
|
|
|
|
// TimeFormat set the time format
|
|
|
|
func TimeFormat(s string) config.Option {
|
|
|
|
return config.SetOption(timeFormatKey{}, s)
|
|
|
|
}
|