Documentation
¶
Overview ¶
Package directive parses directive comments from ast or dst.
Index ¶
- Constants
- func EnumerateCommentGroup(comments *ast.CommentGroup) iter.Seq[string]
- func ExcludeIgnoredGenDecl(genDecl *ast.GenDecl) (bool, error)
- func ExcludeIgnoredTypeSpec(ts *ast.TypeSpec, _ types.Object) (bool, error)
- func ParseFieldDirectiveCommentDst[T any](prefix string, comments dst.FieldDecorations, ...) (T, bool, error)
- type Direction
Constants ¶
View Source
const ( DirectiveCommentIgnore = "ignore" DirectiveCommentGenerated = "generated" )
View Source
const (
DirectivePrefix = "codegen:"
)
Variables ¶
This section is empty.
Functions ¶
func EnumerateCommentGroup ¶
func EnumerateCommentGroup(comments *ast.CommentGroup) iter.Seq[string]
func ExcludeIgnoredTypeSpec ¶
Types ¶
type Direction ¶
type Direction struct {
// contains filtered or unexported fields
}
func ParseDirectiveComment ¶
func ParseDirectiveComment(comments *ast.CommentGroup) (Direction, bool, error)
func (Direction) IsGenerated ¶
func (Direction) MustIgnore ¶
Click to show internal directories.
Click to hide internal directories.