From 457b0030f70e7179cbfb1935461071e8129ed75e Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Wed, 15 Apr 2009 18:38:37 -0700 Subject: [PATCH] godoc: supporting data R=gri DELTA=252 (240 added, 3 deleted, 9 changed) OCL=27482 CL=27521 --- usr/gri/pretty/package.html | 45 ++++++++++++++++++++++++ usr/gri/pretty/package.txt | 61 +++++++++++++++++++++++++++++++++ usr/gri/pretty/packagelist.html | 15 ++++++++ usr/gri/pretty/packagelist.txt | 11 ++++++ usr/gri/pretty/parseerror.html | 4 +++ usr/gri/pretty/parseerror.txt | 6 ++++ 6 files changed, 142 insertions(+) create mode 100644 usr/gri/pretty/package.html create mode 100644 usr/gri/pretty/package.txt create mode 100644 usr/gri/pretty/packagelist.html create mode 100644 usr/gri/pretty/packagelist.txt create mode 100644 usr/gri/pretty/parseerror.html create mode 100644 usr/gri/pretty/parseerror.txt diff --git a/usr/gri/pretty/package.html b/usr/gri/pretty/package.html new file mode 100644 index 0000000000..5e3cbc40bd --- /dev/null +++ b/usr/gri/pretty/package.html @@ -0,0 +1,45 @@ +

package {PackageName|html}

+

import "{ImportPath|html}"

+ +{Doc|html-comment} +{.section Consts} +

Constants

+ {.repeated section @} + {Doc|html-comment} +
{Decl|html}
+ {.end} +{.end} +{.section Vars} +
+

Variables

+ {.repeated section @} + {Doc|html-comment} +
{Decl|html}
+ {.end} +{.end} +{.section Funcs} +
+ {.repeated section @} +

func {Name|html}

+

{Decl|html}

+ {Doc|html-comment} + {.end} +{.end} +{.section Types} +
+ {.repeated section @} +

type {.section Type}{Name|html}{.end}

+ {Doc} +

{Decl|html}

+ {.repeated section Factories} +

func {Name|html}

+

{Decl|html}

+ {Doc|html-comment} + {.end} + {.repeated section Methods} +

func ({Recv|html}) {Name|html}

+

{Decl|html}

+ {Doc|html-comment} + {.end} + {.end} +{.end} diff --git a/usr/gri/pretty/package.txt b/usr/gri/pretty/package.txt new file mode 100644 index 0000000000..127529e96d --- /dev/null +++ b/usr/gri/pretty/package.txt @@ -0,0 +1,61 @@ +PACKAGE + +package {PackageName} +import "{ImportPath}" +{.section Doc} + +{@} +{.end} +{.section Consts} + +CONSTANTS +{.repeated section @} +{# the .repeated section, .section idiom skips over nils in the array} + +{Decl} + +{Doc} +{.end} +{.end} +{.section Vars} + +VARIABLES +{.repeated section @} + +{Decl} + +{Doc} +{.end} +{.end} +{.section Funcs} + +FUNCTIONS +{.repeated section @} + +{Decl} + +{Doc} +{.end} +{.end} +{.section Types} + +TYPES +{.repeated section @} + +{Decl} + +{Doc} +{.repeated section Factories} + +{Decl} + +{Doc} +{.end} +{.repeated section Methods} + +{Decl} + +{Doc} +{.end} +{.end} +{.end} diff --git a/usr/gri/pretty/packagelist.html b/usr/gri/pretty/packagelist.html new file mode 100644 index 0000000000..ffe95da7d7 --- /dev/null +++ b/usr/gri/pretty/packagelist.html @@ -0,0 +1,15 @@ +{.section Packages} +Packages
+{.repeated section @} +{importpath|html}
+{.end} +{.or} +No such package {Path|html}
+{.end} +{.section Subdirs} +
+Directories
+{.repeated section @} +{Path|html}{Name|html}/
+{.end} +{.end} diff --git a/usr/gri/pretty/packagelist.txt b/usr/gri/pretty/packagelist.txt new file mode 100644 index 0000000000..380cfa3763 --- /dev/null +++ b/usr/gri/pretty/packagelist.txt @@ -0,0 +1,11 @@ +{.section Packages} +{# TODO .or doesn't work on .repeated - template bug} +{.repeated section @} +godoc {pakname} +{.end} +{.or} +package not found: {Path} +{.end} +{.repeated section Subdirs} +godoc {Path}/{Name}/ +{.end} diff --git a/usr/gri/pretty/parseerror.html b/usr/gri/pretty/parseerror.html new file mode 100644 index 0000000000..4d12425e48 --- /dev/null +++ b/usr/gri/pretty/parseerror.html @@ -0,0 +1,4 @@ +

Parse errors in {filename}

+
+{.repeated section list}
+{src}{.section msg}«{msg|html}»{.end}{.end}
diff --git a/usr/gri/pretty/parseerror.txt b/usr/gri/pretty/parseerror.txt new file mode 100644 index 0000000000..609cb511b5 --- /dev/null +++ b/usr/gri/pretty/parseerror.txt @@ -0,0 +1,6 @@ +parse errors: +{.repeated section list} +{.section msg} +{filename}:{line}: {msg} +{.end} +{.end} -- 2.48.1