Documentation
¶
Overview ¶
Package commentparser does a basic parse over a source file and returns all of the comments from the code. This is useful for when you want to analyze text written in comments (like copyright notices) but not in the code itself.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Comment ¶
Comment is either a single line or multiline comment in a source code file. A single line comment has StartLine equal to EndLine. The lines are 1-based.
type Comments ¶
type Comments []*Comment
Comments allows us to treat a slice of comments as a unit.
func (Comments) ChunkIterator ¶
ChunkIterator returns a read-only channel and generates the comments in a goroutine, then closes the channel.
Click to show internal directories.
Click to hide internal directories.