CodeQL library for Go
codeql/go-all 0.7.14 (changelog, source)
Search

Module Comments

Provides classes for working with code comments.

Import path

import semmle.go.Comments

Imports

go

Provides classes for working with Go programs.

Classes

BuildConstraintComment

A build constraint comment of the form // +build ... or //go:build ....

Comment

A code comment.

CommentGroup

A comment group, that is, a sequence of comments without any intervening tokens or empty lines.

DocComment

A comment group that is attached to a program element as documentation.

Documentable

A program element to which a documentation comment group may be attached: a file, a field, a specifier, a generic declaration, a function declaration or a go.mod expression.

SlashSlashComment

A single-line comment starting with //.

SlashStarComment

A block comment starting with /* and ending with */.

Aliases

BlockComment

A block comment starting with /* and ending with */.

LineComment

A single-line comment starting with //.