docs

package
v0.0.0-...-c734098 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const BASE = "https://pkg.go.dev/"

Variables

This section is empty.

Functions

func Synopsis

func Synopsis(s string) string

Types

type Doc

type Doc struct {
	URL       string     `json:"url"`
	Name      string     `json:"name"`
	Overview  string     `json:"overview"`
	Types     []Type     `json:"types"`
	Functions []Function `json:"functions"`
}

func GetDoc

func GetDoc(pkg string) (*Doc, error)

GetDoc returns a document representing the specified package/module.

type Documentation

type Documentation string

func (Documentation) Synposis

func (d Documentation) Synposis() string

type Function

type Function struct {
	Name      string       `json:"name"`
	Type      FunctionType `json:"type"`
	Signature string       `json:"signature"`
	MethodOf  string       `json:"methodOf"`

	Example  string   `json:"example"`
	Comments []string `json:"comments"`
}

type FunctionType

type FunctionType string
const (
	FnNormal FunctionType = "normal"
	FnMethod FunctionType = "method"
)

type Type

type Type struct {
	Name      string `json:"name"`
	Type      string `json:"type"`
	Signature string `json:"signature"`

	Comments []string `json:"comments"`
}

func (Type) FullComment

func (t Type) FullComment() string

FullComment returns the entire comment from Type.Comments, joined with new lines.

Jump to

Keyboard shortcuts

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