diff --git a/app/app.go b/app/app.go index 4934e7d9..157c8ee5 100644 --- a/app/app.go +++ b/app/app.go @@ -17,7 +17,7 @@ const ( // 版本号 // // 版本号按照 http://semver.org 中的规则 - Version = "2.15.3+20160707" + Version = "2.15.4+20160707" // 程序的正式名称 Name = "apidoc" @@ -26,7 +26,7 @@ const ( RepoURL = "https://github.com/caixw/apidoc" // 官网 - OfficialURL = "https://caixw.github.io/apidoc" + OfficialURL = "https://apidoc.tools" // 配置文件名称。 ConfigFilename = ".apidoc.json" @@ -54,6 +54,7 @@ func Message(out int, color colors.Color, prefix string, v ...interface{}) { colors.Print(out, colors.Default, colors.Default, v...) } +// Messageln 向终端输出不同颜色的提示信息,带换行符 func Messageln(out int, color colors.Color, prefix string, v ...interface{}) { colors.Print(out, color, colors.Default, prefix) colors.Println(out, colors.Default, colors.Default, v...) diff --git a/config.go b/config.go index fce38790..5075bd9f 100644 --- a/config.go +++ b/config.go @@ -33,7 +33,7 @@ type config struct { type syntaxWriter struct { } -func (w *syntaxWriter) Write(bs []byte) (size int, err error) { +func (w *syntaxWriter) Write(bs []byte) (int, error) { app.Error(string(bs)) return len(bs), nil } diff --git a/output/html.go b/output/html.go index ae8a4ebd..9e73babd 100644 --- a/output/html.go +++ b/output/html.go @@ -133,7 +133,7 @@ func buildHTMLPage(docs *doc.Doc, opt *Options) *htmlPage { // 编译模板 // // tplDir 模板所在的路径,其目录下所有的 .html 文件会被编译,不查找子目录。 -// 若 tplDir 这空,则使用系统默认的模板。 +// 若 tplDir 为空,则使用系统默认的模板。 func compileHTMLTemplate(tplDir string) (*template.Template, error) { t := template.New("html"). Funcs(template.FuncMap{