From 5493f00cd0aa636d6b38926e91d35e5f76b9a9fc Mon Sep 17 00:00:00 2001 From: astaxie Date: Mon, 23 Jun 2014 23:16:06 +0800 Subject: [PATCH] fix the typo --- g_docs.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/g_docs.go b/g_docs.go index 3ed2cf3..afae895 100644 --- a/g_docs.go +++ b/g_docs.go @@ -71,13 +71,14 @@ func init() { } } + func urlReplace(src string) string { pt := strings.Split(src, "/") for i, p := range pt { if len(p) > 0 { if p[0] == ':' { pt[i] = "{" + p[1:] + "}" - } else if p[0] == "?" && p[1] == ":" { + } else if p[0] == '?' && p[1] == ':' { pt[i] = "{" + p[2:] + "}" } }