Skip to content

Commit

Permalink
Add benchmarking info to README
Browse files Browse the repository at this point in the history
Style fixes in README.
  • Loading branch information
matrixik committed Jul 26, 2021
1 parent c8b0faf commit 5f20663
Showing 1 changed file with 17 additions and 5 deletions.
22 changes: 17 additions & 5 deletions README.md
@@ -1,5 +1,4 @@
slug
====
# slug

Package `slug` generate slug from unicode string, URL-friendly slugify with
multiple languages support.
Expand Down Expand Up @@ -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"
Expand All @@ -42,17 +41,30 @@ func main() {
textSub := slug.Make("water is hot")
fmt.Println(textSub) // Will print: "sand-is-hot"
}

```

### Requests or bugs?

<https://github.com/gosimple/slug/issues>

## 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
Expand Down

0 comments on commit 5f20663

Please sign in to comment.