GODOC: how to create a reference to another definition in a comment?

213 views
Skip to first unread message

atd...@gmail.com

unread,
Jan 16, 2021, 8:20:33 AM1/16/21
to golang-nuts
Hello,

Just wondering if there is a way to create references to other fields in go comments.
If it does not exist, wouldn't it be something valuable, for easier navigation in godoc and its new iteration? (I would assume that we would have to check comments for broken references on code change)

atd...@gmail.com

unread,
Jan 20, 2021, 11:57:10 AM1/20/21
to golang-nuts
For instance,

// Node returns a tree node. The value for the node type are specified 
// in the definition of @href="NodeType"
type Node struct{...}

// NodeType defines the types of Node values
// They can be ...etc
type NodeType int


clicking on the ref would allow to make a jump to the relevant part of the documentation for instance.
Is there any facility already for this?
Reply all
Reply to author
Forward
0 new messages