diff options
author | Michael Stapelberg <stapelberg@debian.org> | 2013-03-04 21:27:36 +0100 |
---|---|---|
committer | Michael Stapelberg <michael@stapelberg.de> | 2013-03-04 21:27:36 +0100 |
commit | 04b08da9af0c450d645ab7389d1467308cfc2db8 (patch) | |
tree | db247935fa4f2f94408edc3acd5d0d4f997aa0d8 /src/pkg/go/doc/doc.go | |
parent | 917c5fb8ec48e22459d77e3849e6d388f93d3260 (diff) | |
download | golang-upstream/1.1_hg20130304.tar.gz |
Imported Upstream version 1.1~hg20130304upstream/1.1_hg20130304
Diffstat (limited to 'src/pkg/go/doc/doc.go')
-rw-r--r-- | src/pkg/go/doc/doc.go | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/pkg/go/doc/doc.go b/src/pkg/go/doc/doc.go index 9c606315d..65b1b83eb 100644 --- a/src/pkg/go/doc/doc.go +++ b/src/pkg/go/doc/doc.go @@ -17,7 +17,16 @@ type Package struct { ImportPath string Imports []string Filenames []string - Bugs []string + // DEPRECATED. For backward compatibility Bugs is still populated, + // but all new code should use Notes instead. + Bugs []string + + // Notes such as TODO(userid): or SECURITY(userid): + // along the lines of BUG(userid). Any marker with 2 or more upper + // case [A-Z] letters is recognised. + // BUG is explicitly not included in these notes but will + // be in a subsequent change when the Bugs field above is removed. + Notes map[string][]string // declarations Consts []*Value @@ -89,6 +98,7 @@ func New(pkg *ast.Package, importPath string, mode Mode) *Package { Imports: sortedKeys(r.imports), Filenames: r.filenames, Bugs: r.bugs, + Notes: r.notes, Consts: sortedValues(r.values, token.CONST), Types: sortedTypes(r.types, mode&AllMethods != 0), Vars: sortedValues(r.values, token.VAR), |