Commit 5f20663 1 parent c8b0faf commit 5f20663 Copy full SHA for 5f20663
File tree 1 file changed +17
-5
lines changed
1 file changed +17
-5
lines changed Original file line number Diff line number Diff line change 1
- slug
2
- ====
1
+ # slug
3
2
4
3
Package ` slug ` generate slug from unicode string, URL-friendly slugify with
5
4
multiple languages support.
@@ -31,7 +30,7 @@ func main() {
31
30
32
31
deText := slug.MakeLang (" Diese & Dass" , " de" )
33
32
fmt.Println (deText) // Will print: "diese-und-dass"
34
-
33
+
35
34
slug.Lowercase = false // Keep uppercase characters
36
35
deUppercaseText := slug.MakeLang (" Diese & Dass" , " de" )
37
36
fmt.Println (deUppercaseText) // Will print: "Diese-und-Dass"
@@ -42,17 +41,30 @@ func main() {
42
41
textSub := slug.Make (" water is hot" )
43
42
fmt.Println (textSub) // Will print: "sand-is-hot"
44
43
}
45
-
46
44
```
47
45
48
46
### Requests or bugs?
47
+
49
48
< https://github.com/gosimple/slug/issues >
50
49
51
50
## Installation
52
- ``` sh
51
+
52
+ ``` shell
53
53
go get -u github.com/gosimple/slug
54
54
```
55
55
56
+ ## Benchmarking
57
+
58
+ ``` shell
59
+ go get -u golang.org/x/perf/cmd/benchstat
60
+
61
+ go test -run=NONE -bench=. ./... > old.txt
62
+ # make changes
63
+ go test -run=NONE -bench=. ./... > new.txt
64
+
65
+ benchstat old.txt new.txt
66
+ ```
67
+
56
68
## License
57
69
58
70
The source files are distributed under the
You can’t perform that action at this time.
0 commit comments