godoc

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2026 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Overview

Package godoc parses Go doc comments into structured DocComment values. Go does not use structured tags like PHPDoc/JavaDoc — instead it relies on prose conventions. This parser extracts structure from:

  • The first paragraph as summary
  • "Deprecated:" prefix for deprecation notices
  • Parameter descriptions from prose patterns

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Parser

type Parser struct{}

Parser implements docparser.Parser for Go doc comments.

func New

func New() *Parser

New returns a new Go doc comment parser.

func (*Parser) Parse

func (p *Parser) Parse(raw string) *docparser.DocComment

Parse parses a Go doc comment block into a DocComment. The raw input should be the comment text with // or /* */ delimiters already stripped to bare text.

Jump to

Keyboard shortcuts

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