📅  最后修改于: 2022-03-11 14:45:01.082000             🧑  作者: Mango
// this is the type of functions you want to decorate
type StringManipulator func(string) string
// this is your decorator.
func ToLower(m StringManipulator) StringManipulator {
return func(s string) string {
lower := strings.ToLower(s)
return m(lower)
}
}