command module
Version: v0.0.0-...-a9744cb Latest Latest

This package is not in the latest version of its module.

Go to latest
Published: Sep 7, 2017 License: BSD-2-Clause Imports: 9 Imported by: 0



Spell checking and godoc checking for golang comments.


goword uses both a natural language dictionary and a source token dictionary to spell check comments. The source token dictionary avoids flagging acceptable go-style comments (e.g., vim's :set spell will complain about function names).

goword understands godoc formatting and can detect incorrect labels in godoc comments. This is useful for catching when a function, field, or type name drifts from the godoc documentation.

Unlike misspell checkers, goword has few false negatives. On the other hand, goword is more likely to give false positives. Most false positives may be elided by passing goword an ignore list.

Example Output

A misspelled local function:

/usr/lib/go/src/net/addrselect.go.38: // srcsAddrs tries to UDP-connect to each address to see if it has a (godoc-local: srcsAddrs -> srcAddrs?)

A misspelled comment:

/usr/lib/go/src/os/str.go.5: // Simple converions to avoid depending on strconv. (spell: converions -> conversions?)

An exported function drifted to a local function:

/usr/lib/go/src/go/types/conversions.go.11: // Conversion type-checks the conversion T(x). (godoc-local: Conversion -> conversion?)

Should begin with the function identifier:

/usr/lib/go/src/cmd/compile/internal/gc/builtin/unsafe.go.15: // return types here are ignored; see unsafe.go (godoc-export: return -> Offsetof?)

A local function drifted into an export function:

/usr/lib/go/src/internal/trace/parser.go.583: // symbolizeTrace attaches func/file/line info to stack traces. (godoc-export: symbolizeTrace -> Symbolize?)


goword links against:

and hence requires the corresponding development headers to build.


From your golang project root,

goword file.go [file2.go, file3.go, ...]


The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL