Standard library / go/doc/comment

go/doc/comment.DocLink

Documentation link to a package, declaration or method. Expected stdout: '#Work\n'.

Formal Syntax & Structure

go syntaxgo
type DocLink struct {  Text []Text
  ImportPath string  Recv       string  Name       string}

Working Example

Example Snippetgo
package main
import (  "fmt"  "go/doc/comment")
func main() { l := comment.DocLink{Name: "Work"}; fmt.Println(l.DefaultURL("/pkg/")) }
Go Reference