From 42cef834b22a6addee37a90605ec84f09d84757c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dobros=C5=82aw=20=C5=BBybort?= Date: Fri, 10 May 2013 17:51:12 +0200 Subject: [PATCH] Update: docs examples --- README.md | 6 ++++++ doc.go | 6 ++++++ 2 files changed, 12 insertions(+) diff --git a/README.md b/README.md index d2613ff..c2a4ba2 100644 --- a/README.md +++ b/README.md @@ -27,6 +27,12 @@ multiple languages support. deText := slug.MakeLang("Diese & Dass", "de") fmt.Println(deText) // Will print 'diese-und-dass' + + slug.CustomSub = map[string]string{ + "water": "sand", + } + textSub := slug.Make("water is hot") + fmt.Println(textSub) // Will print 'sand-is-hot' } ### Requests or bugs? diff --git a/doc.go b/doc.go index 0dd642b..f1d8300 100644 --- a/doc.go +++ b/doc.go @@ -28,6 +28,12 @@ Example: deText := slug.MakeLang("Diese & Dass", "de") fmt.Println(deText) // Will print 'diese-und-dass' + + slug.CustomSub = map[string]string{ + "water": "sand", + } + textSub := slug.Make("water is hot") + fmt.Println(textSub) // Will print 'sand-is-hot' } Requests or bugs?