From 0548cea08dba1a7865e15f9cafc2aec904da9832 Mon Sep 17 00:00:00 2001 From: sope Date: Wed, 30 Sep 2015 13:02:39 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=9C=A81.5.1=E7=89=88?= =?UTF-8?q?=E6=9C=AC=E4=B8=8B=E6=8A=A5=E9=94=99:function=20multiply=20not?= =?UTF-8?q?=20defined?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- godoc/godoc.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/godoc/godoc.go b/godoc/godoc.go index 8ec731c..60a6a86 100644 --- a/godoc/godoc.go +++ b/godoc/godoc.go @@ -98,6 +98,9 @@ func (p *Presentation) initFuncMap() { // formatting of Notes "noteTitle": noteTitle, + + // Number operation + "multiply": multiply, } if p.URLForSrc != nil { p.funcMap["srcLink"] = p.URLForSrc @@ -110,6 +113,8 @@ func (p *Presentation) initFuncMap() { } } +func multiply(a, b int) int { return a * b } + func filenameFunc(path string) string { _, localname := pathpkg.Split(path) return localname