Standard library / go/doc/comment

go/doc/comment.Doc

Parsed document containing blocks and link definitions. Expected stdout: '1\n'.

Formal Syntax & Structure

go syntaxgo
type Doc struct {  Content []Block
  Links []*LinkDef}

Working Example

Example Snippetgo
package main
import (  "fmt"  "go/doc/comment")
func main() {  p := comment.Parser{}  var d *comment.Doc = p.Parse("Hello")  fmt.Println(len(d.Content))}
Go Reference