status-go/vendor/github.com/anacrolix/missinggo/v2/strcase.go

12 lines
172 B
Go
Raw Normal View History

2022-03-10 09:44:48 +00:00
package missinggo
import (
"strings"
"github.com/huandu/xstrings"
)
func KebabCase(s string) string {
return strings.Replace(xstrings.ToSnakeCase(s), "_", "-", -1)
}