Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Aug 24, 2022. It is now read-only.

修复在1.5.1版本下报错:function multiply not defined #9

Merged
chai2010 merged 1 commit into golang-china:master from shenshouer:master
Sep 30, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions godoc/godoc.go
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down

AltStyle によって変換されたページ (->オリジナル) /