internal: factor out SymbolMeta
UnitSymbol and Symbol share a lot of fields, which are now factored out
as SymbolMeta.
For golang/go#37102
Change-Id: Ie8590b0a50dafa4199fbe165d94f28028d1a0bb5
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/315431
Trust: Julie Qiu <julie@golang.org>
Run-TryBot: Julie Qiu <julie@golang.org>
TryBot-Result: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
diff --git a/internal/fetch/fetchdata_test.go b/internal/fetch/fetchdata_test.go
index fd56330..3fa9f23 100644
--- a/internal/fetch/fetchdata_test.go
+++ b/internal/fetch/fetchdata_test.go
@@ -44,21 +44,48 @@
GOARCH: internal.All,
Synopsis: "Package pkg is a sample package.",
API: []*internal.Symbol{
- {Name: "Version", Synopsis: "const Version", Section: "Constants", Kind: "Constant"},
- {Name: "V", Synopsis: "var V = Version", Section: "Variables", Kind: "Variable"},
- {Name: "G", Synopsis: "func G() int", Section: "Functions", Kind: "Function"},
{
- Name: "T",
- Synopsis: "type T int",
- Section: "Types",
- Kind: "Type",
- Children: []*internal.Symbol{{
- Name: "F",
- Synopsis: "func F(t time.Time, s string) (T, u)",
- Section: "Types",
- Kind: "Function",
- ParentName: "T",
- }},
+ SymbolMeta: internal.SymbolMeta{
+ Name: "Version",
+ Synopsis: "const Version",
+ Section: "Constants",
+ Kind: "Constant",
+ },
+ },
+ {
+ SymbolMeta: internal.SymbolMeta{
+ Name: "V",
+ Synopsis: "var V = Version",
+ Section: "Variables",
+ Kind: "Variable",
+ },
+ },
+ {
+ SymbolMeta: internal.SymbolMeta{
+ Name: "G",
+ Synopsis: "func G() int",
+ Section: "Functions",
+ Kind: "Function",
+ },
+ },
+ {
+ SymbolMeta: internal.SymbolMeta{
+ Name: "T",
+ Synopsis: "type T int",
+ Section: "Types",
+ Kind: "Type",
+ },
+ Children: []*internal.Symbol{
+ {
+ SymbolMeta: internal.SymbolMeta{
+ Name: "F",
+ Synopsis: "func F(t time.Time, s string) (T, u)",
+ Section: "Types",
+ Kind: "Function",
+ ParentName: "T",
+ },
+ },
+ },
},
},
}},
@@ -109,12 +136,14 @@
Filepath: "README.md",
Contents: "This is the README for a test module.",
},
- Documentation: []*internal.Documentation{{
- GOOS: internal.All,
- GOARCH: internal.All,
- Synopsis: "Package basic is a sample package.",
- API: singleUnits[1].Documentation[0].API,
- }},
+ Documentation: []*internal.Documentation{
+ {
+ GOOS: internal.All,
+ GOARCH: internal.All,
+ Synopsis: "Package basic is a sample package.",
+ API: singleUnits[1].Documentation[0].API,
+ },
+ },
Imports: []string{"time"},
},
},
@@ -155,12 +184,23 @@
Filepath: "bar/README",
Contents: "Another README file for testing.",
},
- Documentation: []*internal.Documentation{{
- GOOS: internal.All,
- GOARCH: internal.All,
- Synopsis: "package bar",
- API: []*internal.Symbol{{Name: "Bar", Synopsis: "func Bar() string", Section: "Functions", Kind: "Function"}},
- }},
+ Documentation: []*internal.Documentation{
+ {
+ GOOS: internal.All,
+ GOARCH: internal.All,
+ Synopsis: "package bar",
+ API: []*internal.Symbol{
+ {
+ SymbolMeta: internal.SymbolMeta{
+ Name: "Bar",
+ Synopsis: "func Bar() string",
+ Section: "Functions",
+ Kind: "Function",
+ },
+ },
+ },
+ },
+ },
},
{
UnitMeta: internal.UnitMeta{
@@ -171,7 +211,16 @@
GOOS: internal.All,
GOARCH: internal.All,
Synopsis: "package foo",
- API: []*internal.Symbol{{Name: "FooBar", Synopsis: "func FooBar() string", Section: "Functions", Kind: "Function"}},
+ API: []*internal.Symbol{
+ {
+ SymbolMeta: internal.SymbolMeta{
+ Name: "FooBar",
+ Synopsis: "func FooBar() string",
+ Section: "Functions",
+ Kind: "Function",
+ },
+ },
+ },
}},
Imports: []string{"example.com/multi/bar", "fmt"},
},
@@ -249,10 +298,12 @@
GOARCH: internal.All,
Synopsis: "Package good is inside a module that has bad packages.",
API: []*internal.Symbol{{
- Name: "Good",
- Synopsis: "const Good",
- Section: "Constants",
- Kind: "Constant",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "Good",
+ Synopsis: "const Good",
+ Section: "Constants",
+ Kind: "Constant",
+ },
}},
}},
},
@@ -314,10 +365,12 @@
Synopsis: "Package cpu implements processor feature detection used by the Go standard library.",
API: []*internal.Symbol{
{
- Name: "CacheLinePadSize",
- Synopsis: "const CacheLinePadSize",
- Section: "Constants",
- Kind: "Constant",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "CacheLinePadSize",
+ Synopsis: "const CacheLinePadSize",
+ Section: "Constants",
+ Kind: "Constant",
+ },
},
},
},
@@ -327,10 +380,12 @@
Synopsis: "Package cpu implements processor feature detection used by the Go standard library.",
API: []*internal.Symbol{
{
- Name: "CacheLinePadSize",
- Synopsis: "const CacheLinePadSize",
- Section: "Constants",
- Kind: "Constant",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "CacheLinePadSize",
+ Synopsis: "const CacheLinePadSize",
+ Section: "Constants",
+ Kind: "Constant",
+ },
},
},
},
@@ -340,10 +395,12 @@
Synopsis: "Package cpu implements processor feature detection used by the Go standard library.",
API: []*internal.Symbol{
{
- Name: "CacheLinePadSize",
- Synopsis: "const CacheLinePadSize",
- Section: "Constants",
- Kind: "Constant",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "CacheLinePadSize",
+ Synopsis: "const CacheLinePadSize",
+ Section: "Constants",
+ Kind: "Constant",
+ },
},
},
},
@@ -445,24 +502,46 @@
Name: "bar",
Path: "example.com/nonredist/bar",
},
- Documentation: []*internal.Documentation{{
- GOOS: internal.All,
- GOARCH: internal.All,
- Synopsis: "package bar",
- API: []*internal.Symbol{{Name: "Bar", Synopsis: "func Bar() string", Section: "Functions", Kind: "Function"}},
- }},
+ Documentation: []*internal.Documentation{
+ {
+ GOOS: internal.All,
+ GOARCH: internal.All,
+ Synopsis: "package bar",
+ API: []*internal.Symbol{
+ {
+ SymbolMeta: internal.SymbolMeta{
+ Name: "Bar",
+ Synopsis: "func Bar() string",
+ Section: "Functions",
+ Kind: "Function",
+ },
+ },
+ },
+ },
+ },
},
{
UnitMeta: internal.UnitMeta{
Name: "baz",
Path: "example.com/nonredist/bar/baz",
},
- Documentation: []*internal.Documentation{{
- GOOS: internal.All,
- GOARCH: internal.All,
- Synopsis: "package baz",
- API: []*internal.Symbol{{Name: "Baz", Synopsis: "func Baz() string", Section: "Functions", Kind: "Function"}},
- }},
+ Documentation: []*internal.Documentation{
+ {
+ GOOS: internal.All,
+ GOARCH: internal.All,
+ Synopsis: "package baz",
+ API: []*internal.Symbol{
+ {
+ SymbolMeta: internal.SymbolMeta{
+ Name: "Baz",
+ Synopsis: "func Baz() string",
+ Section: "Functions",
+ Kind: "Function",
+ },
+ },
+ },
+ },
+ },
},
{
UnitMeta: internal.UnitMeta{
@@ -473,12 +552,23 @@
Filepath: "unk/README.md",
Contents: "README file will be removed before DB insert.",
},
- Documentation: []*internal.Documentation{{
- GOOS: internal.All,
- GOARCH: internal.All,
- Synopsis: "package unk",
- API: []*internal.Symbol{{Name: "FooBar", Synopsis: "func FooBar() string", Section: "Functions", Kind: "Function"}},
- }},
+ Documentation: []*internal.Documentation{
+ {
+ GOOS: internal.All,
+ GOARCH: internal.All,
+ Synopsis: "package unk",
+ API: []*internal.Symbol{
+ {
+ SymbolMeta: internal.SymbolMeta{
+ Name: "FooBar",
+ Synopsis: "func FooBar() string",
+ Section: "Functions",
+ Kind: "Function",
+ },
+ },
+ },
+ },
+ },
Imports: []string{"example.com/nonredist/bar", "fmt"},
},
},
@@ -686,12 +776,22 @@
Name: "js",
Path: "github.com/my/module/js/js",
},
- Documentation: []*internal.Documentation{{
- Synopsis: "Package js only works with wasm.",
- GOOS: "js",
- GOARCH: "wasm",
- API: []*internal.Symbol{{Name: "Value", Synopsis: "type Value int", Section: "Types", Kind: "Type"}},
- }},
+ Documentation: []*internal.Documentation{
+ {
+ Synopsis: "Package js only works with wasm.",
+ GOOS: "js",
+ GOARCH: "wasm",
+ API: []*internal.Symbol{
+ {
+ SymbolMeta: internal.SymbolMeta{Name: "Value",
+ Synopsis: "type Value int",
+ Section: "Types",
+ Kind: "Type",
+ },
+ },
+ },
+ },
+ },
},
},
},
@@ -747,12 +847,14 @@
Synopsis: "Package errors implements functions to manipulate errors.",
API: []*internal.Symbol{
{
- Name: "New",
- Synopsis: "func New(text string) error",
- Section: "Functions",
- Kind: "Function",
- GOOS: internal.All,
- GOARCH: internal.All,
+ SymbolMeta: internal.SymbolMeta{
+ Name: "New",
+ Synopsis: "func New(text string) error",
+ Section: "Functions",
+ Kind: "Function",
+ },
+ GOOS: internal.All,
+ GOARCH: internal.All,
},
},
},
@@ -812,286 +914,378 @@
Name: "builtin",
Path: "builtin",
},
- Documentation: []*internal.Documentation{{
- GOOS: internal.All,
- GOARCH: internal.All,
- Synopsis: "Package builtin provides documentation for Go's predeclared identifiers.",
- API: []*internal.Symbol{
- {
- Name: "true",
- Synopsis: "const true",
- Section: "Constants",
- Kind: "Constant",
- },
- {
- Name: "false",
- Synopsis: "const false",
- Section: "Constants",
- Kind: "Constant",
- },
- {
- Name: "iota",
- Synopsis: "const iota",
- Section: "Constants",
- Kind: "Constant",
- },
- {
- Name: "nil",
- Synopsis: "var nil Type",
- Section: "Variables",
- Kind: "Variable",
- },
- {
- Name: "append",
- Synopsis: "func append(slice []Type, elems ...Type) []Type",
- Section: "Functions",
- Kind: "Function",
- },
- {
- Name: "cap",
- Synopsis: "func cap(v Type) int",
- Section: "Functions",
- Kind: "Function",
- },
- {
- Name: "close",
- Synopsis: "func close(c chan<- Type)",
- Section: "Functions",
- Kind: "Function",
- },
- {
- Name: "complex",
- Synopsis: "func complex(r, i FloatType) ComplexType",
- Section: "Functions",
- Kind: "Function",
- },
- {
- Name: "copy",
- Synopsis: "func copy(dst, src []Type) int",
- Section: "Functions",
- Kind: "Function",
- },
- {
- Name: "delete",
- Synopsis: "func delete(m map[Type]Type1, key Type)",
- Section: "Functions",
- Kind: "Function",
- },
- {
- Name: "imag",
- Synopsis: "func imag(c ComplexType) FloatType",
- Section: "Functions",
- Kind: "Function",
- },
- {
- Name: "len",
- Synopsis: "func len(v Type) int",
- Section: "Functions",
- Kind: "Function",
- },
- {
- Name: "make",
- Synopsis: "func make(t Type, size ...IntegerType) Type",
- Section: "Functions",
- Kind: "Function",
- },
- {
- Name: "new",
- Synopsis: "func new(Type) *Type",
- Section: "Functions",
- Kind: "Function",
- },
- {
- Name: "panic",
- Synopsis: "func panic(v interface{})",
- Section: "Functions",
- Kind: "Function",
- },
- {
- Name: "print",
- Synopsis: "func print(args ...Type)",
- Section: "Functions",
- Kind: "Function",
- },
- {
- Name: "println",
- Synopsis: "func println(args ...Type)",
- Section: "Functions",
- Kind: "Function",
- },
- {
- Name: "real",
- Synopsis: "func real(c ComplexType) FloatType",
- Section: "Functions",
- Kind: "Function",
- },
- {
- Name: "recover",
- Synopsis: "func recover() interface{}",
- Section: "Functions",
- Kind: "Function",
- },
- {
- Name: "ComplexType",
- Synopsis: "type ComplexType complex64",
- Section: "Types",
- Kind: "Type",
- },
- {
- Name: "FloatType",
- Synopsis: "type FloatType float32",
- Section: "Types",
- Kind: "Type",
- },
- {
- Name: "IntegerType",
- Synopsis: "type IntegerType int",
- Section: "Types",
- Kind: "Type",
- },
- {
- Name: "Type",
- Synopsis: "type Type int",
- Section: "Types",
- Kind: "Type",
- },
- {
- Name: "Type1",
- Synopsis: "type Type1 int",
- Section: "Types",
- Kind: "Type",
- },
- {
- Name: "bool",
- Synopsis: "type bool bool",
- Section: "Types",
- Kind: "Type",
- },
- {
- Name: "byte",
- Synopsis: "type byte = uint8",
- Section: "Types",
- Kind: "Type",
- },
- {
- Name: "complex128",
- Synopsis: "type complex128 complex128",
- Section: "Types",
- Kind: "Type",
- },
- {
- Name: "complex64",
- Synopsis: "type complex64 complex64",
- Section: "Types",
- Kind: "Type",
- },
- {
- Name: "error",
- Synopsis: "type error interface",
- Section: "Types",
- Kind: "Type",
- Children: []*internal.Symbol{
- {
- Name: "error.Error",
- Synopsis: "Error func() string",
- Section: "Types",
- Kind: "Method",
- ParentName: "error",
+ Documentation: []*internal.Documentation{
+ {
+ GOOS: internal.All,
+ GOARCH: internal.All,
+ Synopsis: "Package builtin provides documentation for Go's predeclared identifiers.",
+ API: []*internal.Symbol{
+ {
+ SymbolMeta: internal.SymbolMeta{
+ Name: "true",
+ Synopsis: "const true",
+ Section: "Constants",
+ Kind: "Constant",
+ },
+ },
+ {
+ SymbolMeta: internal.SymbolMeta{
+ Name: "false",
+ Synopsis: "const false",
+ Section: "Constants",
+ Kind: "Constant",
+ },
+ },
+ {
+ SymbolMeta: internal.SymbolMeta{
+ Name: "iota",
+ Synopsis: "const iota",
+ Section: "Constants",
+ Kind: "Constant",
+ },
+ },
+ {
+ SymbolMeta: internal.SymbolMeta{
+ Name: "nil",
+ Synopsis: "var nil Type",
+ Section: "Variables",
+ Kind: "Variable",
+ },
+ },
+ {
+ SymbolMeta: internal.SymbolMeta{
+ Name: "append",
+ Synopsis: "func append(slice []Type, elems ...Type) []Type",
+ Section: "Functions",
+ Kind: "Function",
+ },
+ },
+ {
+ SymbolMeta: internal.SymbolMeta{
+ Name: "cap",
+ Synopsis: "func cap(v Type) int",
+ Section: "Functions",
+ Kind: "Function",
+ },
+ },
+ {
+ SymbolMeta: internal.SymbolMeta{
+ Name: "close",
+ Synopsis: "func close(c chan<- Type)",
+ Section: "Functions",
+ Kind: "Function",
+ },
+ },
+ {
+ SymbolMeta: internal.SymbolMeta{
+ Name: "complex",
+ Synopsis: "func complex(r, i FloatType) ComplexType",
+ Section: "Functions",
+ Kind: "Function",
+ },
+ },
+ {
+ SymbolMeta: internal.SymbolMeta{
+ Name: "copy",
+ Synopsis: "func copy(dst, src []Type) int",
+ Section: "Functions",
+ Kind: "Function",
+ },
+ },
+ {
+ SymbolMeta: internal.SymbolMeta{
+ Name: "delete",
+ Synopsis: "func delete(m map[Type]Type1, key Type)",
+ Section: "Functions",
+ Kind: "Function",
+ },
+ },
+ {
+ SymbolMeta: internal.SymbolMeta{
+ Name: "imag",
+ Synopsis: "func imag(c ComplexType) FloatType",
+ Section: "Functions",
+ Kind: "Function",
+ },
+ },
+ {
+ SymbolMeta: internal.SymbolMeta{
+ Name: "len",
+ Synopsis: "func len(v Type) int",
+ Section: "Functions",
+ Kind: "Function",
+ },
+ },
+ {
+ SymbolMeta: internal.SymbolMeta{
+ Name: "make",
+ Synopsis: "func make(t Type, size ...IntegerType) Type",
+ Section: "Functions",
+ Kind: "Function",
+ },
+ },
+ {
+ SymbolMeta: internal.SymbolMeta{
+ Name: "new",
+ Synopsis: "func new(Type) *Type",
+ Section: "Functions",
+ Kind: "Function",
+ },
+ },
+ {
+ SymbolMeta: internal.SymbolMeta{
+ Name: "panic",
+ Synopsis: "func panic(v interface{})",
+ Section: "Functions",
+ Kind: "Function",
+ },
+ },
+ {
+ SymbolMeta: internal.SymbolMeta{
+ Name: "print",
+ Synopsis: "func print(args ...Type)",
+ Section: "Functions",
+ Kind: "Function",
+ },
+ },
+ {
+ SymbolMeta: internal.SymbolMeta{
+ Name: "println",
+ Synopsis: "func println(args ...Type)",
+ Section: "Functions",
+ Kind: "Function",
+ },
+ },
+ {
+ SymbolMeta: internal.SymbolMeta{
+ Name: "real",
+ Synopsis: "func real(c ComplexType) FloatType",
+ Section: "Functions",
+ Kind: "Function",
+ },
+ },
+ {
+ SymbolMeta: internal.SymbolMeta{
+ Name: "recover",
+ Synopsis: "func recover() interface{}",
+ Section: "Functions",
+ Kind: "Function",
+ },
+ },
+ {
+ SymbolMeta: internal.SymbolMeta{
+ Name: "ComplexType",
+ Synopsis: "type ComplexType complex64",
+ Section: "Types",
+ Kind: "Type",
+ },
+ },
+ {
+ SymbolMeta: internal.SymbolMeta{
+ Name: "FloatType",
+ Synopsis: "type FloatType float32",
+ Section: "Types",
+ Kind: "Type",
+ },
+ },
+ {
+ SymbolMeta: internal.SymbolMeta{
+ Name: "IntegerType",
+ Synopsis: "type IntegerType int",
+ Section: "Types",
+ Kind: "Type",
+ },
+ },
+ {
+ SymbolMeta: internal.SymbolMeta{
+ Name: "Type",
+ Synopsis: "type Type int",
+ Section: "Types",
+ Kind: "Type",
+ },
+ },
+ {
+ SymbolMeta: internal.SymbolMeta{
+ Name: "Type1",
+ Synopsis: "type Type1 int",
+ Section: "Types",
+ Kind: "Type",
+ },
+ },
+ {
+ SymbolMeta: internal.SymbolMeta{
+ Name: "bool",
+ Synopsis: "type bool bool",
+ Section: "Types",
+ Kind: "Type",
+ },
+ },
+ {
+ SymbolMeta: internal.SymbolMeta{
+ Name: "byte",
+ Synopsis: "type byte = uint8",
+ Section: "Types",
+ Kind: "Type",
+ },
+ },
+ {
+ SymbolMeta: internal.SymbolMeta{
+ Name: "complex128",
+ Synopsis: "type complex128 complex128",
+ Section: "Types",
+ Kind: "Type",
+ },
+ },
+ {
+ SymbolMeta: internal.SymbolMeta{
+ Name: "complex64",
+ Synopsis: "type complex64 complex64",
+ Section: "Types",
+ Kind: "Type",
+ },
+ },
+ {
+ SymbolMeta: internal.SymbolMeta{
+ Name: "error",
+ Synopsis: "type error interface",
+ Section: "Types",
+ Kind: "Type",
+ },
+ Children: []*internal.Symbol{
+ {
+ SymbolMeta: internal.SymbolMeta{
+ Name: "error.Error",
+ Synopsis: "Error func() string",
+ Section: "Types",
+ Kind: "Method",
+ ParentName: "error",
+ },
+ },
+ },
+ },
+ {
+ SymbolMeta: internal.SymbolMeta{
+ Name: "float32",
+ Synopsis: "type float32 float32",
+ Section: "Types",
+ Kind: "Type",
+ },
+ },
+ {
+ SymbolMeta: internal.SymbolMeta{
+ Name: "float64",
+ Synopsis: "type float64 float64",
+ Section: "Types",
+ Kind: "Type",
+ },
+ },
+ {
+ SymbolMeta: internal.SymbolMeta{
+ Name: "int",
+ Synopsis: "type int int",
+ Section: "Types",
+ Kind: "Type",
+ },
+ },
+ {
+ SymbolMeta: internal.SymbolMeta{
+ Name: "int16",
+ Synopsis: "type int16 int16",
+ Section: "Types",
+ Kind: "Type",
+ },
+ },
+ {
+ SymbolMeta: internal.SymbolMeta{
+ Name: "int32",
+ Synopsis: "type int32 int32",
+ Section: "Types",
+ Kind: "Type",
+ },
+ },
+ {
+ SymbolMeta: internal.SymbolMeta{
+ Name: "int64",
+ Synopsis: "type int64 int64",
+ Section: "Types",
+ Kind: "Type",
+ },
+ },
+ {
+ SymbolMeta: internal.SymbolMeta{
+ Name: "int8",
+ Synopsis: "type int8 int8",
+ Section: "Types",
+ Kind: "Type",
+ },
+ },
+ {
+ SymbolMeta: internal.SymbolMeta{
+ Name: "rune",
+ Synopsis: "type rune = int32",
+ Section: "Types",
+ Kind: "Type"},
+ },
+
+ {
+ SymbolMeta: internal.SymbolMeta{
+ Name: "string",
+ Synopsis: "type string string",
+ Section: "Types",
+ Kind: "Type",
+ },
+ },
+ {
+ SymbolMeta: internal.SymbolMeta{
+ Name: "uint",
+ Synopsis: "type uint uint",
+ Section: "Types",
+ Kind: "Type",
+ },
+ },
+ {
+ SymbolMeta: internal.SymbolMeta{
+ Name: "uint16",
+ Synopsis: "type uint16 uint16",
+ Section: "Types",
+ Kind: "Type",
+ },
+ },
+ {
+ SymbolMeta: internal.SymbolMeta{
+ Name: "uint32",
+ Synopsis: "type uint32 uint32",
+ Section: "Types",
+ Kind: "Type",
+ },
+ },
+ {
+ SymbolMeta: internal.SymbolMeta{
+ Name: "uint64",
+ Synopsis: "type uint64 uint64",
+ Section: "Types",
+ Kind: "Type",
+ },
+ },
+ {
+ SymbolMeta: internal.SymbolMeta{
+ Name: "uint8",
+ Synopsis: "type uint8 uint8",
+ Section: "Types",
+ Kind: "Type",
+ },
+ },
+ {
+ SymbolMeta: internal.SymbolMeta{
+ Name: "uintptr",
+ Synopsis: "type uintptr uintptr",
+ Section: "Types",
+ Kind: "Type",
},
},
},
- {
- Name: "float32",
- Synopsis: "type float32 float32",
- Section: "Types",
- Kind: "Type",
- },
- {
- Name: "float64",
- Synopsis: "type float64 float64",
- Section: "Types",
- Kind: "Type",
- },
- {
- Name: "int",
- Synopsis: "type int int",
- Section: "Types",
- Kind: "Type",
- },
- {
- Name: "int16",
- Synopsis: "type int16 int16",
- Section: "Types",
- Kind: "Type",
- },
- {
- Name: "int32",
- Synopsis: "type int32 int32",
- Section: "Types",
- Kind: "Type",
- },
- {
- Name: "int64",
- Synopsis: "type int64 int64",
- Section: "Types",
- Kind: "Type",
- },
- {
- Name: "int8",
- Synopsis: "type int8 int8",
- Section: "Types",
- Kind: "Type",
- },
- {
- Name: "rune",
- Synopsis: "type rune = int32",
- Section: "Types",
- Kind: "Type"},
-
- {
- Name: "string",
- Synopsis: "type string string",
- Section: "Types",
- Kind: "Type",
- },
- {
- Name: "uint",
- Synopsis: "type uint uint",
- Section: "Types",
- Kind: "Type",
- },
- {
- Name: "uint16",
- Synopsis: "type uint16 uint16",
- Section: "Types",
- Kind: "Type",
- },
- {
- Name: "uint32",
- Synopsis: "type uint32 uint32",
- Section: "Types",
- Kind: "Type",
- },
- {
- Name: "uint64",
- Synopsis: "type uint64 uint64",
- Section: "Types",
- Kind: "Type",
- },
- {
- Name: "uint8",
- Synopsis: "type uint8 uint8",
- Section: "Types",
- Kind: "Type",
- },
- {
- Name: "uintptr",
- Synopsis: "type uintptr uintptr",
- Section: "Types",
- Kind: "Type",
- },
},
- }},
+ },
},
{
UnitMeta: internal.UnitMeta{
@@ -1157,106 +1351,136 @@
Name: "context",
Path: "context",
},
- Documentation: []*internal.Documentation{{
- GOOS: internal.All,
- GOARCH: internal.All,
- Synopsis: "Package context defines the Context type, which carries deadlines, cancelation signals, and other request-scoped values across API boundaries and between processes.",
- API: []*internal.Symbol{
- {
- Name: "Canceled",
- Synopsis: `var Canceled = errors.New("context canceled")`,
- Section: "Variables",
- Kind: "Variable",
- },
- {
- Name: "DeadlineExceeded",
- Synopsis: "var DeadlineExceeded error = deadlineExceededError{}",
- Section: "Variables",
- Kind: "Variable",
- },
- {
- Name: "WithCancel",
- Synopsis: "func WithCancel(parent Context) (ctx Context, cancel CancelFunc)",
- Section: "Functions",
- Kind: "Function",
- },
- {
- Name: "WithDeadline",
- Synopsis: "func WithDeadline(parent Context, d time.Time) (Context, CancelFunc)",
- Section: "Functions",
- Kind: "Function",
- },
- {
- Name: "WithTimeout",
- Synopsis: "func WithTimeout(parent Context, timeout time.Duration) (Context, CancelFunc)",
- Section: "Functions",
- Kind: "Function",
- },
- {
- Name: "CancelFunc",
- Synopsis: "type CancelFunc func()",
- Section: "Types",
- Kind: "Type",
- },
- {
- Name: "Context",
- Synopsis: "type Context interface",
- Section: "Types",
- Kind: "Type",
- Children: []*internal.Symbol{
- {
- Name: "Background",
- Synopsis: "func Background() Context",
- Section: "Types",
- Kind: "Function",
- ParentName: "Context",
+ Documentation: []*internal.Documentation{
+ {
+ GOOS: internal.All,
+ GOARCH: internal.All,
+ Synopsis: "Package context defines the Context type, which carries deadlines, cancelation signals, and other request-scoped values across API boundaries and between processes.",
+ API: []*internal.Symbol{
+ {
+ SymbolMeta: internal.SymbolMeta{
+ Name: "Canceled",
+ Synopsis: `var Canceled = errors.New("context canceled")`,
+ Section: "Variables",
+ Kind: "Variable",
},
- {
- Name: "TODO",
- Synopsis: "func TODO() Context",
- Section: "Types",
- Kind: "Function",
- ParentName: "Context",
+ },
+ {
+ SymbolMeta: internal.SymbolMeta{
+ Name: "DeadlineExceeded",
+ Synopsis: "var DeadlineExceeded error = deadlineExceededError{}",
+ Section: "Variables",
+ Kind: "Variable",
},
- {
- Name: "WithValue",
- Synopsis: "func WithValue(parent Context, key, val interface{}) Context",
- Section: "Types",
- Kind: "Function",
- ParentName: "Context",
+ },
+ {
+ SymbolMeta: internal.SymbolMeta{
+ Name: "WithCancel",
+ Synopsis: "func WithCancel(parent Context) (ctx Context, cancel CancelFunc)",
+ Section: "Functions",
+ Kind: "Function",
},
- {
- Name: "Context.Deadline",
- Synopsis: "Deadline func() (deadline time.Time, ok bool)",
- Section: "Types",
- Kind: "Method",
- ParentName: "Context",
+ },
+ {
+ SymbolMeta: internal.SymbolMeta{
+ Name: "WithDeadline",
+ Synopsis: "func WithDeadline(parent Context, d time.Time) (Context, CancelFunc)",
+ Section: "Functions",
+ Kind: "Function",
},
- {
- Name: "Context.Done",
- Synopsis: "Done func() <-chan struct{}",
- Section: "Types",
- Kind: "Method",
- ParentName: "Context",
+ },
+ {
+ SymbolMeta: internal.SymbolMeta{
+ Name: "WithTimeout",
+ Synopsis: "func WithTimeout(parent Context, timeout time.Duration) (Context, CancelFunc)",
+ Section: "Functions",
+ Kind: "Function",
},
- {
- Name: "Context.Err",
- Synopsis: "Err func() error",
- Section: "Types",
- Kind: "Method",
- ParentName: "Context",
+ },
+ {
+ SymbolMeta: internal.SymbolMeta{
+ Name: "CancelFunc",
+ Synopsis: "type CancelFunc func()",
+ Section: "Types",
+ Kind: "Type",
},
- {
- Name: "Context.Value",
- Synopsis: "Value func(key interface{}) interface{}",
- Section: "Types",
- Kind: "Method",
- ParentName: "Context",
+ },
+ {
+ SymbolMeta: internal.SymbolMeta{
+ Name: "Context",
+ Synopsis: "type Context interface",
+ Section: "Types",
+ Kind: "Type",
+ },
+ Children: []*internal.Symbol{
+ {
+ SymbolMeta: internal.SymbolMeta{
+ Name: "Background",
+ Synopsis: "func Background() Context",
+ Section: "Types",
+ Kind: "Function",
+ ParentName: "Context",
+ },
+ },
+ {
+ SymbolMeta: internal.SymbolMeta{
+ Name: "TODO",
+ Synopsis: "func TODO() Context",
+ Section: "Types",
+ Kind: "Function",
+ ParentName: "Context",
+ },
+ },
+ {
+ SymbolMeta: internal.SymbolMeta{
+ Name: "WithValue",
+ Synopsis: "func WithValue(parent Context, key, val interface{}) Context",
+ Section: "Types",
+ Kind: "Function",
+ ParentName: "Context",
+ },
+ },
+ {
+ SymbolMeta: internal.SymbolMeta{
+ Name: "Context.Deadline",
+ Synopsis: "Deadline func() (deadline time.Time, ok bool)",
+ Section: "Types",
+ Kind: "Method",
+ ParentName: "Context",
+ },
+ },
+ {
+ SymbolMeta: internal.SymbolMeta{
+ Name: "Context.Done",
+ Synopsis: "Done func() <-chan struct{}",
+ Section: "Types",
+ Kind: "Method",
+ ParentName: "Context",
+ },
+ },
+ {
+ SymbolMeta: internal.SymbolMeta{
+ Name: "Context.Err",
+ Synopsis: "Err func() error",
+ Section: "Types",
+ Kind: "Method",
+ ParentName: "Context",
+ },
+ },
+ {
+ SymbolMeta: internal.SymbolMeta{
+ Name: "Context.Value",
+ Synopsis: "Value func(key interface{}) interface{}",
+ Section: "Types",
+ Kind: "Method",
+ ParentName: "Context",
+ },
+ },
},
},
},
},
- }},
+ },
Imports: []string{"errors", "fmt", "reflect", "sync", "time"},
},
{
@@ -1276,471 +1500,603 @@
Synopsis: "Package json implements encoding and decoding of JSON as defined in RFC 7159.",
API: []*internal.Symbol{
{
- Name: "Compact",
- Synopsis: "func Compact(dst *bytes.Buffer, src []byte) error",
- Section: "Functions",
- Kind: "Function",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "Compact",
+ Synopsis: "func Compact(dst *bytes.Buffer, src []byte) error",
+ Section: "Functions",
+ Kind: "Function",
+ },
},
{
- Name: "HTMLEscape",
- Synopsis: "func HTMLEscape(dst *bytes.Buffer, src []byte)",
- Section: "Functions",
- Kind: "Function",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "HTMLEscape",
+ Synopsis: "func HTMLEscape(dst *bytes.Buffer, src []byte)",
+ Section: "Functions",
+ Kind: "Function",
+ },
},
{
- Name: "Indent",
- Synopsis: "func Indent(dst *bytes.Buffer, src []byte, prefix, indent string) error",
- Section: "Functions",
- Kind: "Function",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "Indent",
+ Synopsis: "func Indent(dst *bytes.Buffer, src []byte, prefix, indent string) error",
+ Section: "Functions",
+ Kind: "Function",
+ },
},
{
- Name: "Marshal",
- Synopsis: "func Marshal(v interface{}) ([]byte, error)",
- Section: "Functions",
- Kind: "Function",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "Marshal",
+ Synopsis: "func Marshal(v interface{}) ([]byte, error)",
+ Section: "Functions",
+ Kind: "Function",
+ },
},
{
- Name: "MarshalIndent",
- Synopsis: "func MarshalIndent(v interface{}, prefix, indent string) ([]byte, error)",
- Section: "Functions",
- Kind: "Function",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "MarshalIndent",
+ Synopsis: "func MarshalIndent(v interface{}, prefix, indent string) ([]byte, error)",
+ Section: "Functions",
+ Kind: "Function",
+ },
},
{
- Name: "Unmarshal",
- Synopsis: "func Unmarshal(data []byte, v interface{}) error",
- Section: "Functions",
- Kind: "Function",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "Unmarshal",
+ Synopsis: "func Unmarshal(data []byte, v interface{}) error",
+ Section: "Functions",
+ Kind: "Function",
+ },
},
{
- Name: "Valid",
- Synopsis: "func Valid(data []byte) bool",
- Section: "Functions",
- Kind: "Function",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "Valid",
+ Synopsis: "func Valid(data []byte) bool",
+ Section: "Functions",
+ Kind: "Function",
+ },
},
{
- Name: "Decoder",
- Synopsis: "type Decoder struct",
- Section: "Types",
- Kind: "Type",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "Decoder",
+ Synopsis: "type Decoder struct",
+ Section: "Types",
+ Kind: "Type",
+ },
Children: []*internal.Symbol{
{
- Name: "NewDecoder",
- Synopsis: "func NewDecoder(r io.Reader) *Decoder",
- Section: "Types",
- Kind: "Function",
- ParentName: "Decoder",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "NewDecoder",
+ Synopsis: "func NewDecoder(r io.Reader) *Decoder",
+ Section: "Types",
+ Kind: "Function",
+ ParentName: "Decoder",
+ },
},
{
- Name: "Decoder.Buffered",
- Synopsis: "func (dec *Decoder) Buffered() io.Reader",
- Section: "Types",
- Kind: "Method",
- ParentName: "Decoder",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "Decoder.Buffered",
+ Synopsis: "func (dec *Decoder) Buffered() io.Reader",
+ Section: "Types",
+ Kind: "Method",
+ ParentName: "Decoder",
+ },
},
{
- Name: "Decoder.Decode",
- Synopsis: "func (dec *Decoder) Decode(v interface{}) error",
- Section: "Types",
- Kind: "Method",
- ParentName: "Decoder",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "Decoder.Decode",
+ Synopsis: "func (dec *Decoder) Decode(v interface{}) error",
+ Section: "Types",
+ Kind: "Method",
+ ParentName: "Decoder",
+ },
},
{
- Name: "Decoder.DisallowUnknownFields",
- Synopsis: "func (dec *Decoder) DisallowUnknownFields()",
- Section: "Types",
- Kind: "Method",
- ParentName: "Decoder",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "Decoder.DisallowUnknownFields",
+ Synopsis: "func (dec *Decoder) DisallowUnknownFields()",
+ Section: "Types",
+ Kind: "Method",
+ ParentName: "Decoder",
+ },
},
{
- Name: "Decoder.More",
- Synopsis: "func (dec *Decoder) More() bool",
- Section: "Types",
- Kind: "Method",
- ParentName: "Decoder",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "Decoder.More",
+ Synopsis: "func (dec *Decoder) More() bool",
+ Section: "Types",
+ Kind: "Method",
+ ParentName: "Decoder",
+ },
},
{
- Name: "Decoder.Token",
- Synopsis: "func (dec *Decoder) Token() (Token, error)",
- Section: "Types",
- Kind: "Method",
- ParentName: "Decoder",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "Decoder.Token",
+ Synopsis: "func (dec *Decoder) Token() (Token, error)",
+ Section: "Types",
+ Kind: "Method",
+ ParentName: "Decoder",
+ },
},
{
- Name: "Decoder.UseNumber",
- Synopsis: "func (dec *Decoder) UseNumber()",
- Section: "Types",
- Kind: "Method",
- ParentName: "Decoder",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "Decoder.UseNumber",
+ Synopsis: "func (dec *Decoder) UseNumber()",
+ Section: "Types",
+ Kind: "Method",
+ ParentName: "Decoder",
+ },
},
},
},
{
- Name: "Delim",
- Synopsis: "type Delim rune",
- Section: "Types",
- Kind: "Type",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "Delim",
+ Synopsis: "type Delim rune",
+ Section: "Types",
+ Kind: "Type",
+ },
Children: []*internal.Symbol{
{
- Name: "Delim.String",
- Synopsis: "func (d Delim) String() string",
- Section: "Types",
- Kind: "Method",
- ParentName: "Delim",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "Delim.String",
+ Synopsis: "func (d Delim) String() string",
+ Section: "Types",
+ Kind: "Method",
+ ParentName: "Delim",
+ },
},
},
},
{
- Name: "Encoder",
- Synopsis: "type Encoder struct",
- Section: "Types",
- Kind: "Type",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "Encoder",
+ Synopsis: "type Encoder struct",
+ Section: "Types",
+ Kind: "Type",
+ },
Children: []*internal.Symbol{
{
- Name: "NewEncoder",
- Synopsis: "func NewEncoder(w io.Writer) *Encoder",
- Section: "Types",
- Kind: "Function",
- ParentName: "Encoder",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "NewEncoder",
+ Synopsis: "func NewEncoder(w io.Writer) *Encoder",
+ Section: "Types",
+ Kind: "Function",
+ ParentName: "Encoder",
+ },
},
{
- Name: "Encoder.Encode",
- Synopsis: "func (enc *Encoder) Encode(v interface{}) error",
- Section: "Types",
- Kind: "Method",
- ParentName: "Encoder",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "Encoder.Encode",
+ Synopsis: "func (enc *Encoder) Encode(v interface{}) error",
+ Section: "Types",
+ Kind: "Method",
+ ParentName: "Encoder",
+ },
},
{
- Name: "Encoder.SetEscapeHTML",
- Synopsis: "func (enc *Encoder) SetEscapeHTML(on bool)",
- Section: "Types",
- Kind: "Method",
- ParentName: "Encoder",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "Encoder.SetEscapeHTML",
+ Synopsis: "func (enc *Encoder) SetEscapeHTML(on bool)",
+ Section: "Types",
+ Kind: "Method",
+ ParentName: "Encoder",
+ },
},
{
- Name: "Encoder.SetIndent",
- Synopsis: "func (enc *Encoder) SetIndent(prefix, indent string)",
- Section: "Types",
- Kind: "Method",
- ParentName: "Encoder",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "Encoder.SetIndent",
+ Synopsis: "func (enc *Encoder) SetIndent(prefix, indent string)",
+ Section: "Types",
+ Kind: "Method",
+ ParentName: "Encoder",
+ },
},
},
},
{
- Name: "InvalidUTF8Error",
- Synopsis: "type InvalidUTF8Error struct",
- Section: "Types",
- Kind: "Type",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "InvalidUTF8Error",
+ Synopsis: "type InvalidUTF8Error struct",
+ Section: "Types",
+ Kind: "Type",
+ },
Children: []*internal.Symbol{
{
- Name: "InvalidUTF8Error.S",
- Synopsis: "S string",
- Section: "Types",
- Kind: "Field",
- ParentName: "InvalidUTF8Error",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "InvalidUTF8Error.S",
+ Synopsis: "S string",
+ Section: "Types",
+ Kind: "Field",
+ ParentName: "InvalidUTF8Error",
+ },
},
{
- Name: "InvalidUTF8Error.Error",
- Synopsis: "func (e *InvalidUTF8Error) Error() string",
- Section: "Types",
- Kind: "Method",
- ParentName: "InvalidUTF8Error",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "InvalidUTF8Error.Error",
+ Synopsis: "func (e *InvalidUTF8Error) Error() string",
+ Section: "Types",
+ Kind: "Method",
+ ParentName: "InvalidUTF8Error",
+ },
},
},
},
{
- Name: "InvalidUnmarshalError",
- Synopsis: "type InvalidUnmarshalError struct",
- Section: "Types",
- Kind: "Type",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "InvalidUnmarshalError",
+ Synopsis: "type InvalidUnmarshalError struct",
+ Section: "Types",
+ Kind: "Type",
+ },
Children: []*internal.Symbol{
{
- Name: "InvalidUnmarshalError.Type",
- Synopsis: "Type reflect.Type",
- Section: "Types",
- Kind: "Field",
- ParentName: "InvalidUnmarshalError",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "InvalidUnmarshalError.Type",
+ Synopsis: "Type reflect.Type",
+ Section: "Types",
+ Kind: "Field",
+ ParentName: "InvalidUnmarshalError",
+ },
},
{
- Name: "InvalidUnmarshalError.Error",
- Synopsis: "func (e *InvalidUnmarshalError) Error() string",
- Section: "Types",
- Kind: "Method",
- ParentName: "InvalidUnmarshalError",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "InvalidUnmarshalError.Error",
+ Synopsis: "func (e *InvalidUnmarshalError) Error() string",
+ Section: "Types",
+ Kind: "Method",
+ ParentName: "InvalidUnmarshalError",
+ },
},
},
},
{
- Name: "Marshaler",
- Synopsis: "type Marshaler interface",
- Section: "Types",
- Kind: "Type",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "Marshaler",
+ Synopsis: "type Marshaler interface",
+ Section: "Types",
+ Kind: "Type",
+ },
Children: []*internal.Symbol{
{
- Name: "Marshaler.MarshalJSON",
- Synopsis: "MarshalJSON func() ([]byte, error)",
- Section: "Types",
- Kind: "Method",
- ParentName: "Marshaler",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "Marshaler.MarshalJSON",
+ Synopsis: "MarshalJSON func() ([]byte, error)",
+ Section: "Types",
+ Kind: "Method",
+ ParentName: "Marshaler",
+ },
},
},
},
{
- Name: "MarshalerError",
- Synopsis: "type MarshalerError struct",
- Section: "Types",
- Kind: "Type",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "MarshalerError",
+ Synopsis: "type MarshalerError struct",
+ Section: "Types",
+ Kind: "Type",
+ },
Children: []*internal.Symbol{
{
- Name: "MarshalerError.Type",
- Synopsis: "Type reflect.Type",
- Section: "Types",
- Kind: "Field",
- ParentName: "MarshalerError",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "MarshalerError.Type",
+ Synopsis: "Type reflect.Type",
+ Section: "Types",
+ Kind: "Field",
+ ParentName: "MarshalerError",
+ },
},
{
- Name: "MarshalerError.Err",
- Synopsis: "Err error",
- Section: "Types",
- Kind: "Field",
- ParentName: "MarshalerError",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "MarshalerError.Err",
+ Synopsis: "Err error",
+ Section: "Types",
+ Kind: "Field",
+ ParentName: "MarshalerError",
+ },
},
{
- Name: "MarshalerError.Error",
- Synopsis: "func (e *MarshalerError) Error() string",
- Section: "Types",
- Kind: "Method",
- ParentName: "MarshalerError",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "MarshalerError.Error",
+ Synopsis: "func (e *MarshalerError) Error() string",
+ Section: "Types",
+ Kind: "Method",
+ ParentName: "MarshalerError",
+ },
},
},
},
{
- Name: "Number",
- Synopsis: "type Number string",
- Section: "Types",
- Kind: "Type",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "Number",
+ Synopsis: "type Number string",
+ Section: "Types",
+ Kind: "Type",
+ },
Children: []*internal.Symbol{
{
- Name: "Number.Float64",
- Synopsis: "func (n Number) Float64() (float64, error)",
- Section: "Types",
- Kind: "Method",
- ParentName: "Number",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "Number.Float64",
+ Synopsis: "func (n Number) Float64() (float64, error)",
+ Section: "Types",
+ Kind: "Method",
+ ParentName: "Number",
+ },
},
{
- Name: "Number.Int64",
- Synopsis: "func (n Number) Int64() (int64, error)",
- Section: "Types",
- Kind: "Method",
- ParentName: "Number",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "Number.Int64",
+ Synopsis: "func (n Number) Int64() (int64, error)",
+ Section: "Types",
+ Kind: "Method",
+ ParentName: "Number",
+ },
},
{
- Name: "Number.String",
- Synopsis: "func (n Number) String() string",
- Section: "Types",
- Kind: "Method",
- ParentName: "Number",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "Number.String",
+ Synopsis: "func (n Number) String() string",
+ Section: "Types",
+ Kind: "Method",
+ ParentName: "Number",
+ },
},
},
},
{
- Name: "RawMessage",
- Synopsis: "type RawMessage []byte",
- Section: "Types",
- Kind: "Type",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "RawMessage",
+ Synopsis: "type RawMessage []byte",
+ Section: "Types",
+ Kind: "Type",
+ },
Children: []*internal.Symbol{
{
- Name: "RawMessage.MarshalJSON",
- Synopsis: "func (m RawMessage) MarshalJSON() ([]byte, error)",
- Section: "Types",
- Kind: "Method",
- ParentName: "RawMessage",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "RawMessage.MarshalJSON",
+ Synopsis: "func (m RawMessage) MarshalJSON() ([]byte, error)",
+ Section: "Types",
+ Kind: "Method",
+ ParentName: "RawMessage",
+ },
},
{
- Name: "RawMessage.UnmarshalJSON",
- Synopsis: "func (m *RawMessage) UnmarshalJSON(data []byte) error",
- Section: "Types",
- Kind: "Method",
- ParentName: "RawMessage",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "RawMessage.UnmarshalJSON",
+ Synopsis: "func (m *RawMessage) UnmarshalJSON(data []byte) error",
+ Section: "Types",
+ Kind: "Method",
+ ParentName: "RawMessage",
+ },
},
},
},
{
- Name: "SyntaxError",
- Synopsis: "type SyntaxError struct",
- Section: "Types",
- Kind: "Type",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "SyntaxError",
+ Synopsis: "type SyntaxError struct",
+ Section: "Types",
+ Kind: "Type",
+ },
Children: []*internal.Symbol{
{
- Name: "SyntaxError.Offset",
- Synopsis: "Offset int64",
- Section: "Types",
- Kind: "Field",
- ParentName: "SyntaxError",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "SyntaxError.Offset",
+ Synopsis: "Offset int64",
+ Section: "Types",
+ Kind: "Field",
+ ParentName: "SyntaxError",
+ },
},
{
- Name: "SyntaxError.Error",
- Synopsis: "func (e *SyntaxError) Error() string",
- Section: "Types",
- Kind: "Method",
- ParentName: "SyntaxError",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "SyntaxError.Error",
+ Synopsis: "func (e *SyntaxError) Error() string",
+ Section: "Types",
+ Kind: "Method",
+ ParentName: "SyntaxError",
+ },
},
},
},
{
- Name: "Token",
- Synopsis: "type Token interface",
- Section: "Types",
- Kind: "Type",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "Token",
+ Synopsis: "type Token interface",
+ Section: "Types",
+ Kind: "Type",
+ },
},
{
- Name: "UnmarshalFieldError",
- Synopsis: "type UnmarshalFieldError struct",
- Section: "Types",
- Kind: "Type",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "UnmarshalFieldError",
+ Synopsis: "type UnmarshalFieldError struct",
+ Section: "Types",
+ Kind: "Type",
+ },
Children: []*internal.Symbol{
{
- Name: "UnmarshalFieldError.Key",
- Synopsis: "Key string",
- Section: "Types",
- Kind: "Field",
- ParentName: "UnmarshalFieldError",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "UnmarshalFieldError.Key",
+ Synopsis: "Key string",
+ Section: "Types",
+ Kind: "Field",
+ ParentName: "UnmarshalFieldError",
+ },
},
{
- Name: "UnmarshalFieldError.Type",
- Synopsis: "Type reflect.Type",
- Section: "Types",
- Kind: "Field",
- ParentName: "UnmarshalFieldError",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "UnmarshalFieldError.Type",
+ Synopsis: "Type reflect.Type",
+ Section: "Types",
+ Kind: "Field",
+ ParentName: "UnmarshalFieldError",
+ },
},
{
- Name: "UnmarshalFieldError.Field",
- Synopsis: "Field reflect.StructField",
- Section: "Types",
- Kind: "Field",
- ParentName: "UnmarshalFieldError",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "UnmarshalFieldError.Field",
+ Synopsis: "Field reflect.StructField",
+ Section: "Types",
+ Kind: "Field",
+ ParentName: "UnmarshalFieldError",
+ },
},
{
- Name: "UnmarshalFieldError.Error",
- Synopsis: "func (e *UnmarshalFieldError) Error() string",
- Section: "Types",
- Kind: "Method",
- ParentName: "UnmarshalFieldError",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "UnmarshalFieldError.Error",
+ Synopsis: "func (e *UnmarshalFieldError) Error() string",
+ Section: "Types",
+ Kind: "Method",
+ ParentName: "UnmarshalFieldError",
+ },
},
},
},
{
- Name: "UnmarshalTypeError",
- Synopsis: "type UnmarshalTypeError struct",
- Section: "Types",
- Kind: "Type",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "UnmarshalTypeError",
+ Synopsis: "type UnmarshalTypeError struct",
+ Section: "Types",
+ Kind: "Type",
+ },
Children: []*internal.Symbol{
{
- Name: "UnmarshalTypeError.Value",
- Synopsis: "Value string",
- Section: "Types",
- Kind: "Field",
- ParentName: "UnmarshalTypeError",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "UnmarshalTypeError.Value",
+ Synopsis: "Value string",
+ Section: "Types",
+ Kind: "Field",
+ ParentName: "UnmarshalTypeError",
+ },
},
{
- Name: "UnmarshalTypeError.Type",
- Synopsis: "Type reflect.Type",
- Section: "Types",
- Kind: "Field",
- ParentName: "UnmarshalTypeError",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "UnmarshalTypeError.Type",
+ Synopsis: "Type reflect.Type",
+ Section: "Types",
+ Kind: "Field",
+ ParentName: "UnmarshalTypeError",
+ },
},
{
- Name: "UnmarshalTypeError.Offset",
- Synopsis: "Offset int64",
- Section: "Types",
- Kind: "Field",
- ParentName: "UnmarshalTypeError",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "UnmarshalTypeError.Offset",
+ Synopsis: "Offset int64",
+ Section: "Types",
+ Kind: "Field",
+ ParentName: "UnmarshalTypeError",
+ },
},
{
- Name: "UnmarshalTypeError.Struct",
- Synopsis: "Struct string",
- Section: "Types",
- Kind: "Field",
- ParentName: "UnmarshalTypeError",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "UnmarshalTypeError.Struct",
+ Synopsis: "Struct string",
+ Section: "Types",
+ Kind: "Field",
+ ParentName: "UnmarshalTypeError",
+ },
},
{
- Name: "UnmarshalTypeError.Field",
- Synopsis: "Field string",
- Section: "Types",
- Kind: "Field",
- ParentName: "UnmarshalTypeError",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "UnmarshalTypeError.Field",
+ Synopsis: "Field string",
+ Section: "Types",
+ Kind: "Field",
+ ParentName: "UnmarshalTypeError",
+ },
},
{
- Name: "UnmarshalTypeError.Error",
- Synopsis: "func (e *UnmarshalTypeError) Error() string",
- Section: "Types",
- Kind: "Method",
- ParentName: "UnmarshalTypeError",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "UnmarshalTypeError.Error",
+ Synopsis: "func (e *UnmarshalTypeError) Error() string",
+ Section: "Types",
+ Kind: "Method",
+ ParentName: "UnmarshalTypeError",
+ },
},
},
},
{
- Name: "Unmarshaler",
- Synopsis: "type Unmarshaler interface",
- Section: "Types",
- Kind: "Type",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "Unmarshaler",
+ Synopsis: "type Unmarshaler interface",
+ Section: "Types",
+ Kind: "Type",
+ },
Children: []*internal.Symbol{
{
- Name: "Unmarshaler.UnmarshalJSON",
- Synopsis: "UnmarshalJSON func([]byte) error",
- Section: "Types",
- Kind: "Method",
- ParentName: "Unmarshaler",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "Unmarshaler.UnmarshalJSON",
+ Synopsis: "UnmarshalJSON func([]byte) error",
+ Section: "Types",
+ Kind: "Method",
+ ParentName: "Unmarshaler",
+ },
},
},
},
{
- Name: "UnsupportedTypeError",
- Synopsis: "type UnsupportedTypeError struct",
- Section: "Types",
- Kind: "Type",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "UnsupportedTypeError",
+ Synopsis: "type UnsupportedTypeError struct",
+ Section: "Types",
+ Kind: "Type",
+ },
Children: []*internal.Symbol{
{
- Name: "UnsupportedTypeError.Type",
- Synopsis: "Type reflect.Type",
- Section: "Types",
- Kind: "Field",
- ParentName: "UnsupportedTypeError",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "UnsupportedTypeError.Type",
+ Synopsis: "Type reflect.Type",
+ Section: "Types",
+ Kind: "Field",
+ ParentName: "UnsupportedTypeError",
+ },
},
{
- Name: "UnsupportedTypeError.Error",
- Synopsis: "func (e *UnsupportedTypeError) Error() string",
- Section: "Types",
- Kind: "Method",
- ParentName: "UnsupportedTypeError",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "UnsupportedTypeError.Error",
+ Synopsis: "func (e *UnsupportedTypeError) Error() string",
+ Section: "Types",
+ Kind: "Method",
+ ParentName: "UnsupportedTypeError",
+ },
},
},
},
{
- Name: "UnsupportedValueError",
- Synopsis: "type UnsupportedValueError struct",
- Section: "Types",
- Kind: "Type",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "UnsupportedValueError",
+ Synopsis: "type UnsupportedValueError struct",
+ Section: "Types",
+ Kind: "Type",
+ },
Children: []*internal.Symbol{
{
- Name: "UnsupportedValueError.Value",
- Synopsis: "Value reflect.Value",
- Section: "Types",
- Kind: "Field",
- ParentName: "UnsupportedValueError",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "UnsupportedValueError.Value",
+ Synopsis: "Value reflect.Value",
+ Section: "Types",
+ Kind: "Field",
+ ParentName: "UnsupportedValueError",
+ },
},
{
- Name: "UnsupportedValueError.Str",
- Synopsis: "Str string",
- Section: "Types",
- Kind: "Field",
- ParentName: "UnsupportedValueError",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "UnsupportedValueError.Str",
+ Synopsis: "Str string",
+ Section: "Types",
+ Kind: "Field",
+ ParentName: "UnsupportedValueError",
+ },
},
{
- Name: "UnsupportedValueError.Error",
- Synopsis: "func (e *UnsupportedValueError) Error() string",
- Section: "Types",
- Kind: "Method",
- ParentName: "UnsupportedValueError",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "UnsupportedValueError.Error",
+ Synopsis: "func (e *UnsupportedValueError) Error() string",
+ Section: "Types",
+ Kind: "Method",
+ ParentName: "UnsupportedValueError",
+ },
},
},
},
@@ -1770,12 +2126,23 @@
Name: "errors",
Path: "errors",
},
- Documentation: []*internal.Documentation{{
- GOOS: internal.All,
- GOARCH: internal.All,
- Synopsis: "Package errors implements functions to manipulate errors.",
- API: []*internal.Symbol{{Name: "New", Synopsis: "func New(text string) error", Section: "Functions", Kind: "Function"}},
- }},
+ Documentation: []*internal.Documentation{
+ {
+ GOOS: internal.All,
+ GOARCH: internal.All,
+ Synopsis: "Package errors implements functions to manipulate errors.",
+ API: []*internal.Symbol{
+ {
+ SymbolMeta: internal.SymbolMeta{
+ Name: "New",
+ Synopsis: "func New(text string) error",
+ Section: "Functions",
+ Kind: "Function",
+ },
+ },
+ },
+ },
+ },
},
{
UnitMeta: internal.UnitMeta{
@@ -1790,548 +2157,714 @@
Synopsis: "Package flag implements command-line flag parsing.",
API: []*internal.Symbol{
{
- Name: "CommandLine",
- Synopsis: "var CommandLine = NewFlagSet(os.Args[0], ExitOnError)",
- Section: "Variables",
- Kind: "Variable",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "CommandLine",
+ Synopsis: "var CommandLine = NewFlagSet(os.Args[0], ExitOnError)",
+ Section: "Variables",
+ Kind: "Variable",
+ },
},
{
- Name: "ErrHelp",
- Synopsis: `var ErrHelp = errors.New("flag: help requested")`,
- Section: "Variables",
- Kind: "Variable",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "ErrHelp",
+ Synopsis: `var ErrHelp = errors.New("flag: help requested")`,
+ Section: "Variables",
+ Kind: "Variable",
+ },
},
{
- Name: "Usage",
- Synopsis: "var Usage = func() { ... }",
- Section: "Variables",
- Kind: "Variable",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "Usage",
+ Synopsis: "var Usage = func() { ... }",
+ Section: "Variables",
+ Kind: "Variable",
+ },
},
{
- Name: "Arg",
- Synopsis: "func Arg(i int) string",
- Section: "Functions",
- Kind: "Function",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "Arg",
+ Synopsis: "func Arg(i int) string",
+ Section: "Functions",
+ Kind: "Function",
+ },
},
{
- Name: "Args",
- Synopsis: "func Args() []string",
- Section: "Functions",
- Kind: "Function",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "Args",
+ Synopsis: "func Args() []string",
+ Section: "Functions",
+ Kind: "Function",
+ },
},
{
- Name: "Bool",
- Synopsis: "func Bool(name string, value bool, usage string) *bool",
- Section: "Functions",
- Kind: "Function",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "Bool",
+ Synopsis: "func Bool(name string, value bool, usage string) *bool",
+ Section: "Functions",
+ Kind: "Function",
+ },
},
{
- Name: "BoolVar",
- Synopsis: "func BoolVar(p *bool, name string, value bool, usage string)",
- Section: "Functions",
- Kind: "Function",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "BoolVar",
+ Synopsis: "func BoolVar(p *bool, name string, value bool, usage string)",
+ Section: "Functions",
+ Kind: "Function",
+ },
},
{
- Name: "Duration",
- Synopsis: "func Duration(name string, value time.Duration, usage string) *time.Duration",
- Section: "Functions",
- Kind: "Function",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "Duration",
+ Synopsis: "func Duration(name string, value time.Duration, usage string) *time.Duration",
+ Section: "Functions",
+ Kind: "Function",
+ },
},
{
- Name: "DurationVar",
- Synopsis: "func DurationVar(p *time.Duration, name string, value time.Duration, usage string)",
- Section: "Functions",
- Kind: "Function",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "DurationVar",
+ Synopsis: "func DurationVar(p *time.Duration, name string, value time.Duration, usage string)",
+ Section: "Functions",
+ Kind: "Function",
+ },
},
{
- Name: "Float64",
- Synopsis: "func Float64(name string, value float64, usage string) *float64",
- Section: "Functions",
- Kind: "Function",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "Float64",
+ Synopsis: "func Float64(name string, value float64, usage string) *float64",
+ Section: "Functions",
+ Kind: "Function",
+ },
},
{
- Name: "Float64Var",
- Synopsis: "func Float64Var(p *float64, name string, value float64, usage string)",
- Section: "Functions",
- Kind: "Function",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "Float64Var",
+ Synopsis: "func Float64Var(p *float64, name string, value float64, usage string)",
+ Section: "Functions",
+ Kind: "Function",
+ },
},
{
- Name: "Int",
- Synopsis: "func Int(name string, value int, usage string) *int",
- Section: "Functions",
- Kind: "Function",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "Int",
+ Synopsis: "func Int(name string, value int, usage string) *int",
+ Section: "Functions",
+ Kind: "Function",
+ },
},
{
- Name: "Int64",
- Synopsis: "func Int64(name string, value int64, usage string) *int64",
- Section: "Functions",
- Kind: "Function",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "Int64",
+ Synopsis: "func Int64(name string, value int64, usage string) *int64",
+ Section: "Functions",
+ Kind: "Function",
+ },
},
{
- Name: "Int64Var",
- Synopsis: "func Int64Var(p *int64, name string, value int64, usage string)",
- Section: "Functions",
- Kind: "Function",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "Int64Var",
+ Synopsis: "func Int64Var(p *int64, name string, value int64, usage string)",
+ Section: "Functions",
+ Kind: "Function",
+ },
},
{
- Name: "IntVar",
- Synopsis: "func IntVar(p *int, name string, value int, usage string)",
- Section: "Functions",
- Kind: "Function",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "IntVar",
+ Synopsis: "func IntVar(p *int, name string, value int, usage string)",
+ Section: "Functions",
+ Kind: "Function",
+ },
},
{
- Name: "NArg",
- Synopsis: "func NArg() int",
- Section: "Functions",
- Kind: "Function",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "NArg",
+ Synopsis: "func NArg() int",
+ Section: "Functions",
+ Kind: "Function",
+ },
},
{
- Name: "NFlag",
- Synopsis: "func NFlag() int",
- Section: "Functions",
- Kind: "Function",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "NFlag",
+ Synopsis: "func NFlag() int",
+ Section: "Functions",
+ Kind: "Function",
+ },
},
{
- Name: "Parse",
- Synopsis: "func Parse()",
- Section: "Functions",
- Kind: "Function",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "Parse",
+ Synopsis: "func Parse()",
+ Section: "Functions",
+ Kind: "Function",
+ },
},
{
- Name: "Parsed",
- Synopsis: "func Parsed() bool",
- Section: "Functions",
- Kind: "Function",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "Parsed",
+ Synopsis: "func Parsed() bool",
+ Section: "Functions",
+ Kind: "Function",
+ },
},
{
- Name: "PrintDefaults",
- Synopsis: "func PrintDefaults()",
- Section: "Functions",
- Kind: "Function",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "PrintDefaults",
+ Synopsis: "func PrintDefaults()",
+ Section: "Functions",
+ Kind: "Function",
+ },
},
{
- Name: "Set",
- Synopsis: "func Set(name, value string) error",
- Section: "Functions",
- Kind: "Function",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "Set",
+ Synopsis: "func Set(name, value string) error",
+ Section: "Functions",
+ Kind: "Function",
+ },
},
{
- Name: "String",
- Synopsis: "func String(name string, value string, usage string) *string",
- Section: "Functions",
- Kind: "Function",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "String",
+ Synopsis: "func String(name string, value string, usage string) *string",
+ Section: "Functions",
+ Kind: "Function",
+ },
},
{
- Name: "StringVar",
- Synopsis: "func StringVar(p *string, name string, value string, usage string)",
- Section: "Functions",
- Kind: "Function",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "StringVar",
+ Synopsis: "func StringVar(p *string, name string, value string, usage string)",
+ Section: "Functions",
+ Kind: "Function",
+ },
},
{
- Name: "Uint",
- Synopsis: "func Uint(name string, value uint, usage string) *uint",
- Section: "Functions",
- Kind: "Function",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "Uint",
+ Synopsis: "func Uint(name string, value uint, usage string) *uint",
+ Section: "Functions",
+ Kind: "Function",
+ },
},
{
- Name: "Uint64",
- Synopsis: "func Uint64(name string, value uint64, usage string) *uint64",
- Section: "Functions",
- Kind: "Function",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "Uint64",
+ Synopsis: "func Uint64(name string, value uint64, usage string) *uint64",
+ Section: "Functions",
+ Kind: "Function",
+ },
},
{
- Name: "Uint64Var",
- Synopsis: "func Uint64Var(p *uint64, name string, value uint64, usage string)",
- Section: "Functions",
- Kind: "Function",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "Uint64Var",
+ Synopsis: "func Uint64Var(p *uint64, name string, value uint64, usage string)",
+ Section: "Functions",
+ Kind: "Function",
+ },
},
{
- Name: "UintVar",
- Synopsis: "func UintVar(p *uint, name string, value uint, usage string)",
- Section: "Functions",
- Kind: "Function",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "UintVar",
+ Synopsis: "func UintVar(p *uint, name string, value uint, usage string)",
+ Section: "Functions",
+ Kind: "Function",
+ },
},
{
- Name: "UnquoteUsage",
- Synopsis: "func UnquoteUsage(flag *Flag) (name string, usage string)",
- Section: "Functions",
- Kind: "Function",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "UnquoteUsage",
+ Synopsis: "func UnquoteUsage(flag *Flag) (name string, usage string)",
+ Section: "Functions",
+ Kind: "Function",
+ },
},
{
- Name: "Var",
- Synopsis: "func Var(value Value, name string, usage string)",
- Section: "Functions",
- Kind: "Function",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "Var",
+ Synopsis: "func Var(value Value, name string, usage string)",
+ Section: "Functions",
+ Kind: "Function",
+ },
},
{
- Name: "Visit",
- Synopsis: "func Visit(fn func(*Flag))",
- Section: "Functions",
- Kind: "Function",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "Visit",
+ Synopsis: "func Visit(fn func(*Flag))",
+ Section: "Functions",
+ Kind: "Function",
+ },
},
{
- Name: "VisitAll",
- Synopsis: "func VisitAll(fn func(*Flag))",
- Section: "Functions",
- Kind: "Function",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "VisitAll",
+ Synopsis: "func VisitAll(fn func(*Flag))",
+ Section: "Functions",
+ Kind: "Function",
+ },
},
{
- Name: "ErrorHandling",
- Synopsis: "type ErrorHandling int",
- Section: "Types",
- Kind: "Type",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "ErrorHandling",
+ Synopsis: "type ErrorHandling int",
+ Section: "Types",
+ Kind: "Type",
+ },
Children: []*internal.Symbol{
{
- Name: "ContinueOnError",
- Synopsis: "const ContinueOnError",
- Section: "Types",
- Kind: "Constant",
- ParentName: "ErrorHandling",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "ContinueOnError",
+ Synopsis: "const ContinueOnError",
+ Section: "Types",
+ Kind: "Constant",
+ ParentName: "ErrorHandling",
+ },
},
{
- Name: "ExitOnError",
- Synopsis: "const ExitOnError",
- Section: "Types",
- Kind: "Constant",
- ParentName: "ErrorHandling",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "ExitOnError",
+ Synopsis: "const ExitOnError",
+ Section: "Types",
+ Kind: "Constant",
+ ParentName: "ErrorHandling",
+ },
},
{
- Name: "PanicOnError",
- Synopsis: "const PanicOnError",
- Section: "Types",
- Kind: "Constant",
- ParentName: "ErrorHandling",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "PanicOnError",
+ Synopsis: "const PanicOnError",
+ Section: "Types",
+ Kind: "Constant",
+ ParentName: "ErrorHandling",
+ },
},
},
},
{
- Name: "Flag",
- Synopsis: "type Flag struct",
- Section: "Types",
- Kind: "Type",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "Flag",
+ Synopsis: "type Flag struct",
+ Section: "Types",
+ Kind: "Type",
+ },
Children: []*internal.Symbol{
{
- Name: "Lookup",
- Synopsis: "func Lookup(name string) *Flag",
- Section: "Types",
- Kind: "Function",
- ParentName: "Flag",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "Lookup",
+ Synopsis: "func Lookup(name string) *Flag",
+ Section: "Types",
+ Kind: "Function",
+ ParentName: "Flag",
+ },
},
{
- Name: "Flag.Name",
- Synopsis: "Name string",
- Section: "Types",
- Kind: "Field",
- ParentName: "Flag",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "Flag.Name",
+ Synopsis: "Name string",
+ Section: "Types",
+ Kind: "Field",
+ ParentName: "Flag",
+ },
},
{
- Name: "Flag.Usage",
- Synopsis: "Usage string",
- Section: "Types",
- Kind: "Field",
- ParentName: "Flag",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "Flag.Usage",
+ Synopsis: "Usage string",
+ Section: "Types",
+ Kind: "Field",
+ ParentName: "Flag",
+ },
},
{
- Name: "Flag.Value",
- Synopsis: "Value Value",
- Section: "Types",
- Kind: "Field",
- ParentName: "Flag",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "Flag.Value",
+ Synopsis: "Value Value",
+ Section: "Types",
+ Kind: "Field",
+ ParentName: "Flag",
+ },
},
{
- Name: "Flag.DefValue",
- Synopsis: "DefValue string",
- Section: "Types",
- Kind: "Field",
- ParentName: "Flag",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "Flag.DefValue",
+ Synopsis: "DefValue string",
+ Section: "Types",
+ Kind: "Field",
+ ParentName: "Flag",
+ },
},
},
},
{
- Name: "FlagSet",
- Synopsis: "type FlagSet struct",
- Section: "Types",
- Kind: "Type",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "FlagSet",
+ Synopsis: "type FlagSet struct",
+ Section: "Types",
+ Kind: "Type",
+ },
Children: []*internal.Symbol{
{
- Name: "NewFlagSet",
- Synopsis: "func NewFlagSet(name string, errorHandling ErrorHandling) *FlagSet",
- Section: "Types",
- Kind: "Function",
- ParentName: "FlagSet",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "NewFlagSet",
+ Synopsis: "func NewFlagSet(name string, errorHandling ErrorHandling) *FlagSet",
+ Section: "Types",
+ Kind: "Function",
+ ParentName: "FlagSet",
+ },
},
{
- Name: "FlagSet.Usage",
- Synopsis: "Usage func()",
- Section: "Types",
- Kind: "Field",
- ParentName: "FlagSet",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "FlagSet.Usage",
+ Synopsis: "Usage func()",
+ Section: "Types",
+ Kind: "Field",
+ ParentName: "FlagSet",
+ },
},
{
- Name: "FlagSet.Arg",
- Synopsis: "func (f *FlagSet) Arg(i int) string",
- Section: "Types",
- Kind: "Method",
- ParentName: "FlagSet",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "FlagSet.Arg",
+ Synopsis: "func (f *FlagSet) Arg(i int) string",
+ Section: "Types",
+ Kind: "Method",
+ ParentName: "FlagSet",
+ },
},
{
- Name: "FlagSet.Args",
- Synopsis: "func (f *FlagSet) Args() []string",
- Section: "Types",
- Kind: "Method",
- ParentName: "FlagSet",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "FlagSet.Args",
+ Synopsis: "func (f *FlagSet) Args() []string",
+ Section: "Types",
+ Kind: "Method",
+ ParentName: "FlagSet",
+ },
},
{
- Name: "FlagSet.Bool",
- Synopsis: "func (f *FlagSet) Bool(name string, value bool, usage string) *bool",
- Section: "Types",
- Kind: "Method",
- ParentName: "FlagSet",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "FlagSet.Bool",
+ Synopsis: "func (f *FlagSet) Bool(name string, value bool, usage string) *bool",
+ Section: "Types",
+ Kind: "Method",
+ ParentName: "FlagSet",
+ },
},
{
- Name: "FlagSet.BoolVar",
- Synopsis: "func (f *FlagSet) BoolVar(p *bool, name string, value bool, usage string)",
- Section: "Types",
- Kind: "Method",
- ParentName: "FlagSet",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "FlagSet.BoolVar",
+ Synopsis: "func (f *FlagSet) BoolVar(p *bool, name string, value bool, usage string)",
+ Section: "Types",
+ Kind: "Method",
+ ParentName: "FlagSet",
+ },
},
{
- Name: "FlagSet.Duration",
- Synopsis: "func (f *FlagSet) Duration(name string, value time.Duration, usage string) *time.Duration",
- Section: "Types",
- Kind: "Method",
- ParentName: "FlagSet",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "FlagSet.Duration",
+ Synopsis: "func (f *FlagSet) Duration(name string, value time.Duration, usage string) *time.Duration",
+ Section: "Types",
+ Kind: "Method",
+ ParentName: "FlagSet",
+ },
},
{
- Name: "FlagSet.DurationVar",
- Synopsis: "func (f *FlagSet) DurationVar(p *time.Duration, name string, value time.Duration, usage string)",
- Section: "Types",
- Kind: "Method",
- ParentName: "FlagSet",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "FlagSet.DurationVar",
+ Synopsis: "func (f *FlagSet) DurationVar(p *time.Duration, name string, value time.Duration, usage string)",
+ Section: "Types",
+ Kind: "Method",
+ ParentName: "FlagSet",
+ },
},
{
- Name: "FlagSet.ErrorHandling",
- Synopsis: "func (f *FlagSet) ErrorHandling() ErrorHandling",
- Section: "Types",
- Kind: "Method",
- ParentName: "FlagSet",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "FlagSet.ErrorHandling",
+ Synopsis: "func (f *FlagSet) ErrorHandling() ErrorHandling",
+ Section: "Types",
+ Kind: "Method",
+ ParentName: "FlagSet",
+ },
},
{
- Name: "FlagSet.Float64",
- Synopsis: "func (f *FlagSet) Float64(name string, value float64, usage string) *float64",
- Section: "Types",
- Kind: "Method",
- ParentName: "FlagSet",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "FlagSet.Float64",
+ Synopsis: "func (f *FlagSet) Float64(name string, value float64, usage string) *float64",
+ Section: "Types",
+ Kind: "Method",
+ ParentName: "FlagSet",
+ },
},
{
- Name: "FlagSet.Float64Var",
- Synopsis: "func (f *FlagSet) Float64Var(p *float64, name string, value float64, usage string)",
- Section: "Types",
- Kind: "Method",
- ParentName: "FlagSet",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "FlagSet.Float64Var",
+ Synopsis: "func (f *FlagSet) Float64Var(p *float64, name string, value float64, usage string)",
+ Section: "Types",
+ Kind: "Method",
+ ParentName: "FlagSet",
+ },
},
{
- Name: "FlagSet.Init",
- Synopsis: "func (f *FlagSet) Init(name string, errorHandling ErrorHandling)",
- Section: "Types",
- Kind: "Method",
- ParentName: "FlagSet",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "FlagSet.Init",
+ Synopsis: "func (f *FlagSet) Init(name string, errorHandling ErrorHandling)",
+ Section: "Types",
+ Kind: "Method",
+ ParentName: "FlagSet",
+ },
},
{
- Name: "FlagSet.Int",
- Synopsis: "func (f *FlagSet) Int(name string, value int, usage string) *int",
- Section: "Types",
- Kind: "Method",
- ParentName: "FlagSet",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "FlagSet.Int",
+ Synopsis: "func (f *FlagSet) Int(name string, value int, usage string) *int",
+ Section: "Types",
+ Kind: "Method",
+ ParentName: "FlagSet",
+ },
},
{
- Name: "FlagSet.Int64",
- Synopsis: "func (f *FlagSet) Int64(name string, value int64, usage string) *int64",
- Section: "Types",
- Kind: "Method",
- ParentName: "FlagSet",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "FlagSet.Int64",
+ Synopsis: "func (f *FlagSet) Int64(name string, value int64, usage string) *int64",
+ Section: "Types",
+ Kind: "Method",
+ ParentName: "FlagSet",
+ },
},
{
- Name: "FlagSet.Int64Var",
- Synopsis: "func (f *FlagSet) Int64Var(p *int64, name string, value int64, usage string)",
- Section: "Types",
- Kind: "Method",
- ParentName: "FlagSet",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "FlagSet.Int64Var",
+ Synopsis: "func (f *FlagSet) Int64Var(p *int64, name string, value int64, usage string)",
+ Section: "Types",
+ Kind: "Method",
+ ParentName: "FlagSet",
+ },
},
{
- Name: "FlagSet.IntVar",
- Synopsis: "func (f *FlagSet) IntVar(p *int, name string, value int, usage string)",
- Section: "Types",
- Kind: "Method",
- ParentName: "FlagSet",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "FlagSet.IntVar",
+ Synopsis: "func (f *FlagSet) IntVar(p *int, name string, value int, usage string)",
+ Section: "Types",
+ Kind: "Method",
+ ParentName: "FlagSet",
+ },
},
{
- Name: "FlagSet.Lookup",
- Synopsis: "func (f *FlagSet) Lookup(name string) *Flag",
- Section: "Types",
- Kind: "Method",
- ParentName: "FlagSet",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "FlagSet.Lookup",
+ Synopsis: "func (f *FlagSet) Lookup(name string) *Flag",
+ Section: "Types",
+ Kind: "Method",
+ ParentName: "FlagSet",
+ },
},
{
- Name: "FlagSet.NArg",
- Synopsis: "func (f *FlagSet) NArg() int",
- Section: "Types",
- Kind: "Method",
- ParentName: "FlagSet",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "FlagSet.NArg",
+ Synopsis: "func (f *FlagSet) NArg() int",
+ Section: "Types",
+ Kind: "Method",
+ ParentName: "FlagSet",
+ },
},
{
- Name: "FlagSet.NFlag",
- Synopsis: "func (f *FlagSet) NFlag() int",
- Section: "Types",
- Kind: "Method",
- ParentName: "FlagSet",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "FlagSet.NFlag",
+ Synopsis: "func (f *FlagSet) NFlag() int",
+ Section: "Types",
+ Kind: "Method",
+ ParentName: "FlagSet",
+ },
},
{
- Name: "FlagSet.Name",
- Synopsis: "func (f *FlagSet) Name() string",
- Section: "Types",
- Kind: "Method",
- ParentName: "FlagSet",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "FlagSet.Name",
+ Synopsis: "func (f *FlagSet) Name() string",
+ Section: "Types",
+ Kind: "Method",
+ ParentName: "FlagSet",
+ },
},
{
- Name: "FlagSet.Output",
- Synopsis: "func (f *FlagSet) Output() io.Writer",
- Section: "Types",
- Kind: "Method",
- ParentName: "FlagSet",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "FlagSet.Output",
+ Synopsis: "func (f *FlagSet) Output() io.Writer",
+ Section: "Types",
+ Kind: "Method",
+ ParentName: "FlagSet",
+ },
},
{
- Name: "FlagSet.Parse",
- Synopsis: "func (f *FlagSet) Parse(arguments []string) error",
- Section: "Types",
- Kind: "Method",
- ParentName: "FlagSet",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "FlagSet.Parse",
+ Synopsis: "func (f *FlagSet) Parse(arguments []string) error",
+ Section: "Types",
+ Kind: "Method",
+ ParentName: "FlagSet",
+ },
},
{
- Name: "FlagSet.Parsed",
- Synopsis: "func (f *FlagSet) Parsed() bool",
- Section: "Types",
- Kind: "Method",
- ParentName: "FlagSet",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "FlagSet.Parsed",
+ Synopsis: "func (f *FlagSet) Parsed() bool",
+ Section: "Types",
+ Kind: "Method",
+ ParentName: "FlagSet",
+ },
},
{
- Name: "FlagSet.PrintDefaults",
- Synopsis: "func (f *FlagSet) PrintDefaults()",
- Section: "Types",
- Kind: "Method",
- ParentName: "FlagSet",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "FlagSet.PrintDefaults",
+ Synopsis: "func (f *FlagSet) PrintDefaults()",
+ Section: "Types",
+ Kind: "Method",
+ ParentName: "FlagSet",
+ },
},
{
- Name: "FlagSet.Set",
- Synopsis: "func (f *FlagSet) Set(name, value string) error",
- Section: "Types",
- Kind: "Method",
- ParentName: "FlagSet",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "FlagSet.Set",
+ Synopsis: "func (f *FlagSet) Set(name, value string) error",
+ Section: "Types",
+ Kind: "Method",
+ ParentName: "FlagSet",
+ },
},
{
- Name: "FlagSet.SetOutput",
- Synopsis: "func (f *FlagSet) SetOutput(output io.Writer)",
- Section: "Types",
- Kind: "Method",
- ParentName: "FlagSet",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "FlagSet.SetOutput",
+ Synopsis: "func (f *FlagSet) SetOutput(output io.Writer)",
+ Section: "Types",
+ Kind: "Method",
+ ParentName: "FlagSet",
+ },
},
{
- Name: "FlagSet.String",
- Synopsis: "func (f *FlagSet) String(name string, value string, usage string) *string",
- Section: "Types",
- Kind: "Method",
- ParentName: "FlagSet",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "FlagSet.String",
+ Synopsis: "func (f *FlagSet) String(name string, value string, usage string) *string",
+ Section: "Types",
+ Kind: "Method",
+ ParentName: "FlagSet",
+ },
},
{
- Name: "FlagSet.StringVar",
- Synopsis: "func (f *FlagSet) StringVar(p *string, name string, value string, usage string)",
- Section: "Types",
- Kind: "Method",
- ParentName: "FlagSet",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "FlagSet.StringVar",
+ Synopsis: "func (f *FlagSet) StringVar(p *string, name string, value string, usage string)",
+ Section: "Types",
+ Kind: "Method",
+ ParentName: "FlagSet",
+ },
},
{
- Name: "FlagSet.Uint",
- Synopsis: "func (f *FlagSet) Uint(name string, value uint, usage string) *uint",
- Section: "Types",
- Kind: "Method",
- ParentName: "FlagSet",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "FlagSet.Uint",
+ Synopsis: "func (f *FlagSet) Uint(name string, value uint, usage string) *uint",
+ Section: "Types",
+ Kind: "Method",
+ ParentName: "FlagSet",
+ },
},
{
- Name: "FlagSet.Uint64",
- Synopsis: "func (f *FlagSet) Uint64(name string, value uint64, usage string) *uint64",
- Section: "Types",
- Kind: "Method",
- ParentName: "FlagSet",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "FlagSet.Uint64",
+ Synopsis: "func (f *FlagSet) Uint64(name string, value uint64, usage string) *uint64",
+ Section: "Types",
+ Kind: "Method",
+ ParentName: "FlagSet",
+ },
},
{
- Name: "FlagSet.Uint64Var",
- Synopsis: "func (f *FlagSet) Uint64Var(p *uint64, name string, value uint64, usage string)",
- Section: "Types",
- Kind: "Method",
- ParentName: "FlagSet",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "FlagSet.Uint64Var",
+ Synopsis: "func (f *FlagSet) Uint64Var(p *uint64, name string, value uint64, usage string)",
+ Section: "Types",
+ Kind: "Method",
+ ParentName: "FlagSet",
+ },
},
{
- Name: "FlagSet.UintVar",
- Synopsis: "func (f *FlagSet) UintVar(p *uint, name string, value uint, usage string)",
- Section: "Types",
- Kind: "Method",
- ParentName: "FlagSet",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "FlagSet.UintVar",
+ Synopsis: "func (f *FlagSet) UintVar(p *uint, name string, value uint, usage string)",
+ Section: "Types",
+ Kind: "Method",
+ ParentName: "FlagSet",
+ },
},
{
- Name: "FlagSet.Var",
- Synopsis: "func (f *FlagSet) Var(value Value, name string, usage string)",
- Section: "Types",
- Kind: "Method",
- ParentName: "FlagSet",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "FlagSet.Var",
+ Synopsis: "func (f *FlagSet) Var(value Value, name string, usage string)",
+ Section: "Types",
+ Kind: "Method",
+ ParentName: "FlagSet",
+ },
},
{
- Name: "FlagSet.Visit",
- Synopsis: "func (f *FlagSet) Visit(fn func(*Flag))",
- Section: "Types",
- Kind: "Method",
- ParentName: "FlagSet",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "FlagSet.Visit",
+ Synopsis: "func (f *FlagSet) Visit(fn func(*Flag))",
+ Section: "Types",
+ Kind: "Method",
+ ParentName: "FlagSet",
+ },
},
{
- Name: "FlagSet.VisitAll",
- Synopsis: "func (f *FlagSet) VisitAll(fn func(*Flag))",
- Section: "Types",
- Kind: "Method",
- ParentName: "FlagSet",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "FlagSet.VisitAll",
+ Synopsis: "func (f *FlagSet) VisitAll(fn func(*Flag))",
+ Section: "Types",
+ Kind: "Method",
+ ParentName: "FlagSet",
+ },
},
},
},
{
- Name: "Getter",
- Synopsis: "type Getter interface",
- Section: "Types",
- Kind: "Type",
- Children: []*internal.Symbol{{
- Name: "Getter.Get",
- Synopsis: "Get func() interface{}",
- Section: "Types",
- Kind: "Method",
- ParentName: "Getter",
- }},
- },
- {
- Name: "Value",
- Synopsis: "type Value interface",
- Section: "Types",
- Kind: "Type",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "Getter",
+ Synopsis: "type Getter interface",
+ Section: "Types",
+ Kind: "Type",
+ },
Children: []*internal.Symbol{
{
- Name: "Value.String",
- Synopsis: "String func() string",
- Section: "Types",
- Kind: "Method",
- ParentName: "Value",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "Getter.Get",
+ Synopsis: "Get func() interface{}",
+ Section: "Types",
+ Kind: "Method",
+ ParentName: "Getter",
+ },
+ },
+ },
+ },
+ {
+ SymbolMeta: internal.SymbolMeta{
+ Name: "Value",
+ Synopsis: "type Value interface",
+ Section: "Types",
+ Kind: "Type",
+ },
+ Children: []*internal.Symbol{
+ {
+ SymbolMeta: internal.SymbolMeta{
+ Name: "Value.String",
+ Synopsis: "String func() string",
+ Section: "Types",
+ Kind: "Method",
+ ParentName: "Value",
+ },
},
{
- Name: "Value.Set",
- Synopsis: "Set func(string) error",
- Section: "Types",
- Kind: "Method",
- ParentName: "Value",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "Value.Set",
+ Synopsis: "Set func(string) error",
+ Section: "Types",
+ Kind: "Method",
+ ParentName: "Value",
+ },
},
},
},
@@ -2371,12 +2904,23 @@
Name: "foo",
Path: "github.com/my/module/foo",
},
- Documentation: []*internal.Documentation{{
- GOOS: internal.All,
- GOARCH: internal.All,
- Synopsis: "package foo exports a helpful constant.",
- API: []*internal.Symbol{{Name: "Bar", Synopsis: "const Bar", Section: "Constants", Kind: "Constant"}},
- }},
+ Documentation: []*internal.Documentation{
+ {
+ GOOS: internal.All,
+ GOARCH: internal.All,
+ Synopsis: "package foo exports a helpful constant.",
+ API: []*internal.Symbol{
+ {
+ SymbolMeta: internal.SymbolMeta{
+ Name: "Bar",
+ Synopsis: "const Bar",
+ Section: "Constants",
+ Kind: "Constant",
+ },
+ },
+ },
+ },
+ },
},
},
},
@@ -2414,8 +2958,18 @@
GOOS: internal.All,
GOARCH: internal.All,
Synopsis: "package foo exports a helpful constant.",
- API: []*internal.Symbol{{Name: "Bar", Synopsis: "const Bar", Section: "Constants", Kind: "Constant"}},
- }},
+ API: []*internal.Symbol{
+ {
+ SymbolMeta: internal.SymbolMeta{
+ Name: "Bar",
+ Synopsis: "const Bar",
+ Section: "Constants",
+ Kind: "Constant",
+ },
+ },
+ },
+ },
+ },
},
},
},
@@ -2495,10 +3049,12 @@
var moduleFuncExample = moduleWithExamples("func.example",
[]*internal.Symbol{
{
- Name: "F",
- Synopsis: "func F()",
- Section: "Functions",
- Kind: "Function",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "F",
+ Synopsis: "func F()",
+ Section: "Functions",
+ Kind: "Function",
+ },
},
},
`func F() {}
@@ -2511,7 +3067,17 @@
`, "Documentation-exampleButtonsContainer")
var moduleTypeExample = moduleWithExamples("type.example",
- []*internal.Symbol{{Name: "T", Synopsis: "type T struct", Section: "Types", Kind: "Type"}},
+ []*internal.Symbol{
+ {
+ SymbolMeta: internal.SymbolMeta{
+ Name: "T",
+ Synopsis: "type T struct",
+ Section: "Types",
+ Kind: "Type",
+ },
+ },
+ },
+
`type T struct{}
`, `import "type.example/example"
@@ -2524,17 +3090,21 @@
var moduleMethodExample = moduleWithExamples("method.example",
[]*internal.Symbol{
{
- Name: "T",
- Synopsis: "type T struct",
- Section: "Types",
- Kind: "Type",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "T",
+ Synopsis: "type T struct",
+ Section: "Types",
+ Kind: "Type",
+ },
Children: []*internal.Symbol{
{
- Name: "T.M",
- Synopsis: "func (*T) M()",
- Section: "Types",
- Kind: "Method",
- ParentName: "T",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "T.M",
+ Synopsis: "func (*T) M()",
+ Section: "Types",
+ Kind: "Method",
+ ParentName: "T",
+ },
},
},
},
diff --git a/internal/frontend/symbol.go b/internal/frontend/symbol.go
index f50a8da..d7d2248 100644
--- a/internal/frontend/symbol.go
+++ b/internal/frontend/symbol.go
@@ -223,7 +223,11 @@
// unitSymbol returns an *internal.unitSymbol from the provided *Symbol.
func unitSymbol(s *Symbol) *internal.UnitSymbol {
- us := &internal.UnitSymbol{Name: s.Name}
+ us := &internal.UnitSymbol{
+ SymbolMeta: internal.SymbolMeta{
+ Name: s.Name,
+ },
+ }
if len(s.Builds) == 0 {
us.AddBuildContext(internal.BuildContextAll)
}
diff --git a/internal/godoc/dochtml/symbol.go b/internal/godoc/dochtml/symbol.go
index 6ec2005..1438dc0 100644
--- a/internal/godoc/dochtml/symbol.go
+++ b/internal/godoc/dochtml/symbol.go
@@ -46,10 +46,12 @@
continue
}
syms = append(syms, &internal.Symbol{
- Name: n,
- Synopsis: "const " + n,
- Section: internal.SymbolSectionConstants,
- Kind: internal.SymbolKindConstant,
+ SymbolMeta: internal.SymbolMeta{
+ Name: n,
+ Synopsis: "const " + n,
+ Section: internal.SymbolSectionConstants,
+ Kind: internal.SymbolKindConstant,
+ },
})
}
}
@@ -74,10 +76,12 @@
syn := render.ConstOrVarSynopsis(&vs, fset, token.VAR, "", 0, 0)
syms = append(syms,
&internal.Symbol{
- Name: ident.Name,
- Synopsis: syn,
- Section: internal.SymbolSectionVariables,
- Kind: internal.SymbolKindVariable,
+ SymbolMeta: internal.SymbolMeta{
+ Name: ident.Name,
+ Synopsis: syn,
+ Section: internal.SymbolSectionVariables,
+ Kind: internal.SymbolKindVariable,
+ },
})
}
@@ -90,10 +94,12 @@
var syms []*internal.Symbol
for _, f := range p.Funcs {
syms = append(syms, &internal.Symbol{
- Name: f.Name,
- Synopsis: render.OneLineNodeDepth(fset, f.Decl, 0),
- Section: internal.SymbolSectionFunctions,
- Kind: internal.SymbolKindFunction,
+ SymbolMeta: internal.SymbolMeta{
+ Name: f.Name,
+ Synopsis: render.OneLineNodeDepth(fset, f.Decl, 0),
+ Section: internal.SymbolSectionFunctions,
+ Kind: internal.SymbolKindFunction,
+ },
})
}
return syms
@@ -115,10 +121,12 @@
return nil, err
}
t := &internal.Symbol{
- Name: typ.Name,
- Synopsis: strings.TrimSuffix(strings.TrimSuffix(render.OneLineNodeDepth(fset, spec, 0), "{ ... }"), "{}"),
- Section: internal.SymbolSectionTypes,
- Kind: internal.SymbolKindType,
+ SymbolMeta: internal.SymbolMeta{
+ Name: typ.Name,
+ Synopsis: strings.TrimSuffix(strings.TrimSuffix(render.OneLineNodeDepth(fset, spec, 0), "{ ... }"), "{}"),
+ Section: internal.SymbolSectionTypes,
+ Kind: internal.SymbolKindType,
+ },
}
fields := fieldsForType(typ.Name, spec, fset)
if err != nil {
@@ -165,11 +173,13 @@
var syms []*internal.Symbol
for _, f := range t.Funcs {
syms = append(syms, &internal.Symbol{
- Name: f.Name,
- ParentName: t.Name,
- Kind: internal.SymbolKindFunction,
- Synopsis: render.OneLineNodeDepth(fset, f.Decl, 0),
- Section: internal.SymbolSectionTypes,
+ SymbolMeta: internal.SymbolMeta{
+ Name: f.Name,
+ ParentName: t.Name,
+ Kind: internal.SymbolKindFunction,
+ Synopsis: render.OneLineNodeDepth(fset, f.Decl, 0),
+ Section: internal.SymbolSectionTypes,
+ },
})
}
return syms
@@ -189,11 +199,13 @@
synopsis := fmt.Sprintf("%s %s", n, render.OneLineNodeDepth(fset, f.Type, 0))
name := typName + "." + n.Name
syms = append(syms, &internal.Symbol{
- Name: name,
- ParentName: typName,
- Kind: internal.SymbolKindField,
- Synopsis: synopsis,
- Section: internal.SymbolSectionTypes,
+ SymbolMeta: internal.SymbolMeta{
+ Name: name,
+ ParentName: typName,
+ Kind: internal.SymbolKindField,
+ Synopsis: synopsis,
+ Section: internal.SymbolSectionTypes,
+ },
})
}
}
@@ -204,11 +216,13 @@
var syms []*internal.Symbol
for _, m := range t.Methods {
syms = append(syms, &internal.Symbol{
- Name: t.Name + "." + m.Name,
- ParentName: t.Name,
- Kind: internal.SymbolKindMethod,
- Synopsis: render.OneLineNodeDepth(fset, m.Decl, 0),
- Section: internal.SymbolSectionTypes,
+ SymbolMeta: internal.SymbolMeta{
+ Name: t.Name + "." + m.Name,
+ ParentName: t.Name,
+ Kind: internal.SymbolKindMethod,
+ Synopsis: render.OneLineNodeDepth(fset, m.Decl, 0),
+ Section: internal.SymbolSectionTypes,
+ },
})
}
if st, ok := spec.Type.(*ast.InterfaceType); ok {
@@ -223,11 +237,13 @@
name := t.Name + "." + n.Name
synopsis := render.OneLineField(fset, m, 0)
syms = append(syms, &internal.Symbol{
- Name: name,
- ParentName: t.Name,
- Kind: internal.SymbolKindMethod,
- Synopsis: synopsis,
- Section: internal.SymbolSectionTypes,
+ SymbolMeta: internal.SymbolMeta{
+ Name: name,
+ ParentName: t.Name,
+ Kind: internal.SymbolKindMethod,
+ Synopsis: synopsis,
+ Section: internal.SymbolSectionTypes,
+ },
})
}
}
diff --git a/internal/godoc/dochtml/symbol_test.go b/internal/godoc/dochtml/symbol_test.go
index db74526..a037701 100644
--- a/internal/godoc/dochtml/symbol_test.go
+++ b/internal/godoc/dochtml/symbol_test.go
@@ -23,201 +23,257 @@
}
want := []*internal.Symbol{
{
- Name: "AA",
- Synopsis: "const AA",
- Section: "Constants",
- Kind: "Constant",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "AA",
+ Synopsis: "const AA",
+ Section: "Constants",
+ Kind: "Constant",
+ },
},
{
- Name: "BB",
- Synopsis: "const BB",
- Section: "Constants",
- Kind: "Constant",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "BB",
+ Synopsis: "const BB",
+ Section: "Constants",
+ Kind: "Constant",
+ },
},
{
- Name: "CC",
- Synopsis: "const CC",
- Section: "Constants",
- Kind: "Constant",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "CC",
+ Synopsis: "const CC",
+ Section: "Constants",
+ Kind: "Constant",
+ },
},
{
- Name: "C",
- Synopsis: "const C",
- Section: "Constants",
- Kind: "Constant",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "C",
+ Synopsis: "const C",
+ Section: "Constants",
+ Kind: "Constant",
+ },
},
{
- Name: "ErrA",
- Synopsis: `var ErrA = errors.New("error A")`,
- Section: "Variables",
- Kind: "Variable",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "ErrA",
+ Synopsis: `var ErrA = errors.New("error A")`,
+ Section: "Variables",
+ Kind: "Variable",
+ },
},
{
- Name: "ErrB",
- Synopsis: `var ErrB = errors.New("error B")`,
- Section: "Variables",
- Kind: "Variable",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "ErrB",
+ Synopsis: `var ErrB = errors.New("error B")`,
+ Section: "Variables",
+ Kind: "Variable",
+ },
},
{
- Name: "A",
- Synopsis: "var A string",
- Section: "Variables",
- Kind: "Variable",
- },
-
- {
- Name: "B",
- Synopsis: "var B string",
- Section: "Variables",
- Kind: "Variable",
- },
-
- {
- Name: "V",
- Synopsis: "var V = 2",
- Section: "Variables",
- Kind: "Variable",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "A",
+ Synopsis: "var A string",
+ Section: "Variables",
+ Kind: "Variable",
+ },
},
{
- Name: "F",
- Synopsis: "func F()",
- Section: "Functions",
- Kind: "Function",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "B",
+ Synopsis: "var B string",
+ Section: "Variables",
+ Kind: "Variable",
+ },
},
{
- Name: "A",
- Synopsis: "type A int",
- Section: "Types",
- Kind: "Type",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "V",
+ Synopsis: "var V = 2",
+ Section: "Variables",
+ Kind: "Variable",
+ },
},
{
- Name: "B",
- Synopsis: "type B bool",
- Section: "Types",
- Kind: "Type",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "F",
+ Synopsis: "func F()",
+ Section: "Functions",
+ Kind: "Function",
+ },
},
{
- Name: "I1",
- Synopsis: "type I1 interface",
- Section: "Types",
- Kind: "Type",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "A",
+ Synopsis: "type A int",
+ Section: "Types",
+ Kind: "Type",
+ },
+ },
+ {
+ SymbolMeta: internal.SymbolMeta{
+ Name: "B",
+ Synopsis: "type B bool",
+ Section: "Types",
+ Kind: "Type",
+ },
+ },
+ {
+ SymbolMeta: internal.SymbolMeta{
+ Name: "I1",
+ Synopsis: "type I1 interface",
+ Section: "Types",
+ Kind: "Type",
+ },
Children: []*internal.Symbol{
{
- Name: "I1.M1",
- Synopsis: "M1 func()",
- Section: "Types",
- ParentName: "I1",
- Kind: "Method",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "I1.M1",
+ Synopsis: "M1 func()",
+ Section: "Types",
+ ParentName: "I1",
+ Kind: "Method",
+ },
},
},
},
{
- Name: "I2",
- Synopsis: "type I2 interface",
- Section: "Types",
- Kind: "Type",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "I2",
+ Synopsis: "type I2 interface",
+ Section: "Types",
+ Kind: "Type",
+ },
Children: []*internal.Symbol{
{
- Name: "I2.M2",
- Synopsis: "M2 func()",
- Section: "Types",
- ParentName: "I2",
- Kind: "Method",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "I2.M2",
+ Synopsis: "M2 func()",
+ Section: "Types",
+ ParentName: "I2",
+ Kind: "Method",
+ },
},
},
},
{
- Name: "Num",
- Synopsis: "type Num int",
- Section: "Types",
- Kind: "Type",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "Num",
+ Synopsis: "type Num int",
+ Section: "Types",
+ Kind: "Type",
+ },
Children: []*internal.Symbol{
{
- Name: "DD",
- Synopsis: "const DD",
- Section: "Types",
- Kind: "Constant",
- ParentName: "Num",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "DD",
+ Synopsis: "const DD",
+ Section: "Types",
+ Kind: "Constant",
+ ParentName: "Num",
+ },
},
{
- Name: "EE",
- Synopsis: "const EE",
- Section: "Types",
- Kind: "Constant",
- ParentName: "Num",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "EE",
+ Synopsis: "const EE",
+ Section: "Types",
+ Kind: "Constant",
+ ParentName: "Num",
+ },
},
{
- Name: "FF",
- Synopsis: "const FF",
- Section: "Types",
- Kind: "Constant",
- ParentName: "Num",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "FF",
+ Synopsis: "const FF",
+ Section: "Types",
+ Kind: "Constant",
+ ParentName: "Num",
+ },
},
},
},
{
- Name: "S1",
- Synopsis: "type S1 struct",
- Section: "Types",
- Kind: "Type",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "S1",
+ Synopsis: "type S1 struct",
+ Section: "Types",
+ Kind: "Type",
+ },
Children: []*internal.Symbol{
{
- Name: "S1.F",
- Synopsis: "F int",
- Section: "Types",
- ParentName: "S1",
- Kind: "Field",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "S1.F",
+ Synopsis: "F int",
+ Section: "Types",
+ ParentName: "S1",
+ Kind: "Field",
+ },
},
},
},
{
- Name: "S2",
- Synopsis: "type S2 struct",
- Section: "Types",
- Kind: "Type",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "S2",
+ Synopsis: "type S2 struct",
+ Section: "Types",
+ Kind: "Type",
+ },
Children: []*internal.Symbol{
{
- Name: "S2.G",
- Synopsis: "G int",
- Section: "Types",
- ParentName: "S2",
- Kind: "Field",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "S2.G",
+ Synopsis: "G int",
+ Section: "Types",
+ ParentName: "S2",
+ Kind: "Field",
+ },
},
},
},
{
- Name: "T",
- Synopsis: "type T int",
- Section: "Types",
- Kind: "Type",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "T",
+ Synopsis: "type T int",
+ Section: "Types",
+ Kind: "Type",
+ },
Children: []*internal.Symbol{
{
- Name: "CT",
- Synopsis: "const CT",
- Section: "Types",
- ParentName: "T",
- Kind: "Constant",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "CT",
+ Synopsis: "const CT",
+ Section: "Types",
+ ParentName: "T",
+ Kind: "Constant",
+ },
},
{
- Name: "VT",
- Synopsis: "var VT T",
- Section: "Types",
- ParentName: "T",
- Kind: "Variable",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "VT",
+ Synopsis: "var VT T",
+ Section: "Types",
+ ParentName: "T",
+ Kind: "Variable",
+ },
},
{
- Name: "TF",
- Synopsis: "func TF() T",
- Section: "Types",
- ParentName: "T",
- Kind: "Function",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "TF",
+ Synopsis: "func TF() T",
+ Section: "Types",
+ ParentName: "T",
+ Kind: "Function",
+ },
},
{
- Name: "T.M",
- Synopsis: "func (T) M()",
- Section: "Types",
- ParentName: "T",
- Kind: "Method",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "T.M",
+ Synopsis: "func (T) M()",
+ Section: "Types",
+ ParentName: "T",
+ Kind: "Method",
+ },
},
},
},
diff --git a/internal/postgres/symbol_test.go b/internal/postgres/symbol_test.go
index d38e2f9..87deb31 100644
--- a/internal/postgres/symbol_test.go
+++ b/internal/postgres/symbol_test.go
@@ -132,25 +132,31 @@
defer cancel()
typ := internal.Symbol{
- Name: "Foo",
- Synopsis: "type Foo struct",
- Section: internal.SymbolSectionTypes,
- Kind: internal.SymbolKindType,
- ParentName: "Foo",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "Foo",
+ Synopsis: "type Foo struct",
+ Section: internal.SymbolSectionTypes,
+ Kind: internal.SymbolKindType,
+ ParentName: "Foo",
+ },
}
methodA := internal.Symbol{
- Name: "Foo.A",
- Synopsis: "func (*Foo) A()",
- Section: internal.SymbolSectionTypes,
- Kind: internal.SymbolKindMethod,
- ParentName: typ.Name,
+ SymbolMeta: internal.SymbolMeta{
+ Name: "Foo.A",
+ Synopsis: "func (*Foo) A()",
+ Section: internal.SymbolSectionTypes,
+ Kind: internal.SymbolKindMethod,
+ ParentName: typ.Name,
+ },
}
methodB := internal.Symbol{
- Name: "Foo.B",
- Synopsis: "func (*Foo) B()",
- Section: internal.SymbolSectionTypes,
- Kind: internal.SymbolKindMethod,
- ParentName: typ.Name,
+ SymbolMeta: internal.SymbolMeta{
+ Name: "Foo.B",
+ Synopsis: "func (*Foo) B()",
+ Section: internal.SymbolSectionTypes,
+ Kind: internal.SymbolKindMethod,
+ ParentName: typ.Name,
+ },
}
typA := typ
typA.Children = []*internal.Symbol{&methodA}
@@ -234,25 +240,31 @@
defer cancel()
typ := internal.Symbol{
- Name: "Foo",
- Synopsis: "type Foo struct",
- Section: internal.SymbolSectionTypes,
- Kind: internal.SymbolKindType,
- ParentName: "Foo",
+ SymbolMeta: internal.SymbolMeta{
+ Name: "Foo",
+ Synopsis: "type Foo struct",
+ Section: internal.SymbolSectionTypes,
+ Kind: internal.SymbolKindType,
+ ParentName: "Foo",
+ },
}
methodA := internal.Symbol{
- Name: "Foo.A",
- Synopsis: "func (*Foo) A()",
- Section: internal.SymbolSectionTypes,
- Kind: internal.SymbolKindMethod,
- ParentName: typ.Name,
+ SymbolMeta: internal.SymbolMeta{
+ Name: "Foo.A",
+ Synopsis: "func (*Foo) A()",
+ Section: internal.SymbolSectionTypes,
+ Kind: internal.SymbolKindMethod,
+ ParentName: typ.Name,
+ },
}
methodB := internal.Symbol{
- Name: "Foo.B",
- Synopsis: "func (*Foo) B()",
- Section: internal.SymbolSectionTypes,
- Kind: internal.SymbolKindMethod,
- ParentName: typ.Name,
+ SymbolMeta: internal.SymbolMeta{
+ Name: "Foo.B",
+ Synopsis: "func (*Foo) B()",
+ Section: internal.SymbolSectionTypes,
+ Kind: internal.SymbolKindMethod,
+ ParentName: typ.Name,
+ },
}
mod10 := moduleWithSymbols(t, "v1.0.0", []*internal.Symbol{&typ})
mod11 := moduleWithSymbols(t, "v1.1.0", nil)
@@ -504,12 +516,14 @@
}
func unitSymbolFromSymbol(s *internal.Symbol, version string) *internal.UnitSymbol {
us := &internal.UnitSymbol{
- Name: s.Name,
- ParentName: s.ParentName,
- Section: s.Section,
- Kind: s.Kind,
- Synopsis: s.Synopsis,
- Version: version,
+ SymbolMeta: internal.SymbolMeta{
+ Name: s.Name,
+ ParentName: s.ParentName,
+ Section: s.Section,
+ Kind: s.Kind,
+ Synopsis: s.Synopsis,
+ },
+ Version: version,
}
us.AddBuildContext(internal.BuildContext{GOOS: s.GOOS, GOARCH: s.GOARCH})
return us
diff --git a/internal/symbol.go b/internal/symbol.go
index fbf3bc3..7c4c21c 100644
--- a/internal/symbol.go
+++ b/internal/symbol.go
@@ -31,6 +31,23 @@
// Symbol is an element in the package API. A symbol can be a constant,
// variable, function, or type.
type Symbol struct {
+ SymbolMeta
+
+ // Children contain the child symbols for this symbol. This will
+ // only be populated when the SymbolType is "Type". For example, the
+ // children of net/http.Handler are FileServer, NotFoundHandler,
+ // RedirectHandler, StripPrefix, and TimeoutHandler. Each child
+ // symbol will have ParentName set to the Name of this type.
+ Children []*Symbol
+
+ // GOOS specifies the execution operating system where the symbol appears.
+ GOOS string
+
+ // GOARCH specifies the execution architecture where the symbol appears.
+ GOARCH string
+}
+
+type SymbolMeta struct {
// Name is the name of the symbol.
Name string
@@ -49,29 +66,11 @@
// the empty string. For example, the parent type for
// net/http.FileServer is Handler.
ParentName string
-
- // Children contain the child symbols for this symbol. This will
- // only be populated when the SymbolType is "Type". For example, the
- // children of net/http.Handler are FileServer, NotFoundHandler,
- // RedirectHandler, StripPrefix, and TimeoutHandler. Each child
- // symbol will have ParentName set to the Name of this type.
- Children []*Symbol
-
- // GOOS specifies the execution operating system where the symbol appears.
- GOOS string
-
- // GOARCH specifies the execution architecture where the symbol appears.
- GOARCH string
}
// UnitSymbol represents a symbol that is part of a unit.
type UnitSymbol struct {
- // TODO: factor out duplicate fields between Symbol and UnitSymbol
- Name string
- ParentName string
- Synopsis string
- Section SymbolSection
- Kind SymbolKind
+ SymbolMeta
// Version is the unit version.
Version string
diff --git a/internal/symbol/intro_test.go b/internal/symbol/intro_test.go
index d11cc44..4970341 100644
--- a/internal/symbol/intro_test.go
+++ b/internal/symbol/intro_test.go
@@ -25,7 +25,11 @@
if _, ok := input[s.version]; !ok {
input[s.version] = map[string]*internal.UnitSymbol{}
}
- us := &internal.UnitSymbol{Name: s.name}
+ us := &internal.UnitSymbol{
+ SymbolMeta: internal.SymbolMeta{
+ Name: s.name,
+ },
+ }
for _, b := range internal.BuildContexts {
us.AddBuildContext(b)
}
@@ -33,13 +37,25 @@
}
want := map[string]map[string]*internal.UnitSymbol{
"v1.0.0": {
- "Foo": &internal.UnitSymbol{Name: "Foo"},
+ "Foo": &internal.UnitSymbol{
+ SymbolMeta: internal.SymbolMeta{
+ Name: "Foo",
+ },
+ },
},
"v1.1.0": {
- "Bar": &internal.UnitSymbol{Name: "Bar"},
+ "Bar": &internal.UnitSymbol{
+ SymbolMeta: internal.SymbolMeta{
+ Name: "Bar",
+ },
+ },
},
"v1.2.0": {
- "Foo.A": &internal.UnitSymbol{Name: "Foo.A"},
+ "Foo.A": &internal.UnitSymbol{
+ SymbolMeta: internal.SymbolMeta{
+ Name: "Foo.A",
+ },
+ },
},
}
got := IntroducedHistory(input)
@@ -77,14 +93,22 @@
}
us, ok := input[s.version][s.name]
if !ok {
- us = &internal.UnitSymbol{Name: s.name}
+ us = &internal.UnitSymbol{
+ SymbolMeta: internal.SymbolMeta{
+ Name: s.name,
+ },
+ }
input[s.version][s.name] = us
}
us.AddBuildContext(s.build)
}
withBuilds := func(name string, builds ...internal.BuildContext) *internal.UnitSymbol {
- us := &internal.UnitSymbol{Name: name}
+ us := &internal.UnitSymbol{
+ SymbolMeta: internal.SymbolMeta{
+ Name: name,
+ },
+ }
for _, b := range builds {
us.AddBuildContext(b)
}
diff --git a/internal/testing/sample/sample.go b/internal/testing/sample/sample.go
index c9f3eb6..ee4f789 100644
--- a/internal/testing/sample/sample.go
+++ b/internal/testing/sample/sample.go
@@ -63,64 +63,78 @@
var V int
`
Constant = &internal.Symbol{
- Name: "Constant",
- Synopsis: "const Constant",
- Section: internal.SymbolSectionConstants,
- Kind: internal.SymbolKindConstant,
- GOOS: internal.All,
- GOARCH: internal.All,
+ SymbolMeta: internal.SymbolMeta{
+ Name: "Constant",
+ Synopsis: "const Constant",
+ Section: internal.SymbolSectionConstants,
+ Kind: internal.SymbolKindConstant,
+ },
+ GOOS: internal.All,
+ GOARCH: internal.All,
}
Variable = &internal.Symbol{
- Name: "Variable",
- Synopsis: "var Variable",
- Section: internal.SymbolSectionVariables,
- Kind: internal.SymbolKindVariable,
- GOOS: internal.All,
- GOARCH: internal.All,
+ SymbolMeta: internal.SymbolMeta{
+ Name: "Variable",
+ Synopsis: "var Variable",
+ Section: internal.SymbolSectionVariables,
+ Kind: internal.SymbolKindVariable,
+ },
+ GOOS: internal.All,
+ GOARCH: internal.All,
}
Function = &internal.Symbol{
- Name: "Function",
- Synopsis: "func Function() error",
- Section: internal.SymbolSectionFunctions,
- Kind: internal.SymbolKindFunction,
- GOOS: internal.All,
- GOARCH: internal.All,
+ SymbolMeta: internal.SymbolMeta{
+ Name: "Function",
+ Synopsis: "func Function() error",
+ Section: internal.SymbolSectionFunctions,
+ Kind: internal.SymbolKindFunction,
+ },
+ GOOS: internal.All,
+ GOARCH: internal.All,
}
FunctionNew = &internal.Symbol{
- Name: "New",
- Synopsis: "func New() *Type",
- Section: internal.SymbolSectionTypes,
- Kind: internal.SymbolKindFunction,
- ParentName: "Type",
- GOOS: internal.All,
- GOARCH: internal.All,
+ SymbolMeta: internal.SymbolMeta{
+ Name: "New",
+ Synopsis: "func New() *Type",
+ Section: internal.SymbolSectionTypes,
+ Kind: internal.SymbolKindFunction,
+ ParentName: "Type",
+ },
+ GOOS: internal.All,
+ GOARCH: internal.All,
}
Type = &internal.Symbol{
- Name: "Type",
- Synopsis: "type Type struct",
- Section: internal.SymbolSectionTypes,
- Kind: internal.SymbolKindType,
- GOOS: internal.All,
- GOARCH: internal.All,
+ SymbolMeta: internal.SymbolMeta{
+ Name: "Type",
+ Synopsis: "type Type struct",
+ Section: internal.SymbolSectionTypes,
+ Kind: internal.SymbolKindType,
+ },
+ GOOS: internal.All,
+ GOARCH: internal.All,
Children: []*internal.Symbol{
FunctionNew,
{
- Name: "Type.Field",
- Synopsis: "field",
- Section: internal.SymbolSectionTypes,
- Kind: internal.SymbolKindField,
- ParentName: "Type",
- GOOS: internal.All,
- GOARCH: internal.All,
+ SymbolMeta: internal.SymbolMeta{
+ Name: "Type.Field",
+ Synopsis: "field",
+ Section: internal.SymbolSectionTypes,
+ Kind: internal.SymbolKindField,
+ ParentName: "Type",
+ },
+ GOOS: internal.All,
+ GOARCH: internal.All,
},
{
- Name: "Type.Method",
- Synopsis: "method",
- Section: internal.SymbolSectionTypes,
- Kind: internal.SymbolKindMethod,
- ParentName: "Type",
- GOOS: internal.All,
- GOARCH: internal.All,
+ SymbolMeta: internal.SymbolMeta{
+ Name: "Type.Method",
+ Synopsis: "method",
+ Section: internal.SymbolSectionTypes,
+ Kind: internal.SymbolKindMethod,
+ ParentName: "Type",
+ },
+ GOOS: internal.All,
+ GOARCH: internal.All,
},
},
}