Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var CStyleCommentOptions *lege.ParseOptions = &lege.ParseOptions{ Boundaries: []lege.Boundary{ lege.Boundary{ Start: "//", End: "\n", }, lege.Boundary{ Start: "/*", End: "*/", }, }, }
CStyleCommentOptions ...
View Source
var HashStyleCommentOptions *lege.ParseOptions = &lege.ParseOptions{ Boundaries: []lege.Boundary{ lege.Boundary{ Start: "#", End: "\n", }, }, }
HashStyleCommentOptions ...
View Source
var LanguageParseOptions map[Language]*lege.ParseOptions = map[Language]*lege.ParseOptions{ "Go": CStyleCommentOptions, "Java": CStyleCommentOptions, "C": CStyleCommentOptions, "C++": CStyleCommentOptions, "C#": CStyleCommentOptions, "JavaScript": CStyleCommentOptions, "Python": HashStyleCommentOptions, "Ruby": HashStyleCommentOptions, "PHP": CStyleCommentOptions, "Shell": HashStyleCommentOptions, "Visual Basic": &lege.ParseOptions{Boundaries: []lege.Boundary{lege.Boundary{Start: "'", End: "\n"}}}, "TypeScript": CStyleCommentOptions, "Objective-C": CStyleCommentOptions, "Groovy": CStyleCommentOptions, "Swift": CStyleCommentOptions, }
LanguageParseOptions keeps track of source languages and their corresponding comment options
Functions ¶
This section is empty.
Types ¶
type Comment ¶
type Comment struct { lege.Collection FilePath string }
Comment represents a comment in a source code file
type Comments ¶
type Comments []*Comment
Comments is a list of comments
func SearchCommit ¶
SearchCommit searches all files in the tree of a given commit
func SearchFile ¶
func SearchFile(filePath string, reader io.ReadCloser) (Comments, error)
SearchFile searches a file for comments. It infers the language
Click to show internal directories.
Click to hide internal directories.