commentparse

package
v0.251.1 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2026 License: MIT Imports: 10 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package commentparse parses source code comments and creates a source code comment database.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetIdentifierComment

func GetIdentifierComment(packagePath, typeName string) string

GetIdentifierComment returns the comment for an identifier.

func GetIdentifierConstantComment

func GetIdentifierConstantComment(packagePath, typeName string, constantValue any) string

GetIdentifierConstantComment returns the comment for a constant value of an identifier.

func GetInterfaceComment

func GetInterfaceComment(packagePath, typeName string) string

GetInterfaceComment returns the comment for an interface.

func GetInterfaceMethodComment

func GetInterfaceMethodComment(packagePath, typeName, methodName string) string

GetInterfaceMethodComment returns the comment for a method in an interface.

func GetStructComment

func GetStructComment(packagePath, typeName string) string

GetStructComment returns the comment for a struct.

func GetStructFieldComment

func GetStructFieldComment(packagePath, typeName, fieldName string) string

GetStructFieldComment returns the comment for a field in a struct.

func GetStructMethodComment

func GetStructMethodComment(packagePath, typeName, methodName string) string

GetStructMethodComment returns the comment for a method in a struct.

func MustWriteGeneratedCode

func MustWriteGeneratedCode(parsedComments *comments)

MustWriteGeneratedCode outputs the generated code to `outputDirectory/commentparse_gen.go`

func Parse

func Parse(pattern string, includeTests bool) *comments

Parse all go code specified by pattern, returns generated comments for comment indexing

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL