Standard library / go/doc/comment
go/doc/comment.Paragraph
Holds inline text within a paragraph. Expected stdout: 'Hello\n'.
Formal Syntax & Structure
go syntaxgo
type Paragraph struct { Text []Text}Working Example
Example Snippetgo
package main
import ( "fmt" "go/doc/comment")
func main() { p := comment.Parser{} d := p.Parse("Hello") x := d.Content[0].(*comment.Paragraph) fmt.Println(x.Text[0])}