diff --git a/README.md b/README.md index ca6d837..5a4abe3 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,4 @@ -slug -==== +# slug Package `slug` generate slug from unicode string, URL-friendly slugify with multiple languages support. @@ -31,7 +30,7 @@ func main() { deText := slug.MakeLang("Diese & Dass", "de") fmt.Println(deText) // Will print: "diese-und-dass" - + slug.Lowercase = false // Keep uppercase characters deUppercaseText := slug.MakeLang("Diese & Dass", "de") fmt.Println(deUppercaseText) // Will print: "Diese-und-Dass" @@ -42,17 +41,30 @@ func main() { textSub := slug.Make("water is hot") fmt.Println(textSub) // Will print: "sand-is-hot" } - ``` ### Requests or bugs? + ## Installation -```sh + +```shell go get -u github.com/gosimple/slug ``` +## Benchmarking + +```shell +go get -u golang.org/x/perf/cmd/benchstat + +go test -run=NONE -bench=. ./... > old.txt +# make changes +go test -run=NONE -bench=. ./... > new.txt + +benchstat old.txt new.txt +``` + ## License The source files are distributed under the