Documentation ¶
Overview ¶
Package cmt provides functions that parse and render GIR comments into nice and conventional Go comments.
Index ¶
Constants ¶
const (
CommentsTabWidth = 4
)
Variables ¶
This section is empty.
Functions ¶
func EnsureInfoFields ¶
func EnsureInfoFields(v interface{}) struct{}
EnsureInfoFields ensures that the given type contains all fields inside InfoFields.
Types ¶
type InfoFields ¶
type InfoFields struct { Name *string Attrs *gir.InfoAttrs Elements *gir.InfoElements ParamDocs []ParamDoc ReturnDocs []ParamDoc }
InfoFields contains common fields that a GIR schema type may contain. These fields should rarely be used, because they're too magical. All fields inside InfoFields are optional.
func GetInfoFields ¶
func GetInfoFields(v interface{}) InfoFields
GetInfoFields gets the InfoFields from the given value.
type Option ¶
type Option interface {
// contains filtered or unexported methods
}
Option defines possible options for GoDoc.
func AdditionalPrefix ¶
AdditionalPrefix adds the given prefix string into the head of the comment.
func AdditionalString ¶
AdditionalString adds the given string into the tail of the comment as another paragraph.
func OverrideSelfName ¶
OverrideSelfName overrides the Go type name that's implicitly converted automatically by GoDoc.
func ParagraphIndent ¶
ParagraphIndent indents the inner comment paragraphs.
func TrailingNewLine ¶
func TrailingNewLine() Option
TrailingNewLine adds a trailing new line during documentation generation.