You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+2Lines changed: 2 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -118,6 +118,8 @@ The documentation information that is output is formatted using a series of text
118
118
119
119
- doc: generates the freeform documentation block for any of the above
120
120
structures that can contain a documentation section.
121
+
122
+
- import: generates the import code used to pull in a package.
121
123
```
122
124
123
125
Overriding with the \-t option uses a key\-vaule pair mapping a template name to the file containing the contents of the override template to use\. Specified template files must exist:
NewPackageFromBuild creates a representation of a package's documentation from the build metadata for that package\. It can be configured using the provided options\.
Examples provides the package\-level examples that have been defined\. This does not include examples that are associated with symbols contained within the package\.
Import provides the raw text for the import declaration that is used to import code from the package\. If your package's documentation is generated from a local path and does not use Go Modules\, this will typically print \`import "\."\`\.
ImportPath provides the identifier used for the package when installing or importing the package\. If your package's documentation is generated from a local path and does not use Go Modules\, this will typically print \`\.\`\.
is.Equal(pkg.Summary(), "Package encoding defines interfaces shared by other packages that convert data to and from byte-level and textual representations.")
147
152
is.Equal(len(pkg.Consts()), 0) // encoding should have no constants
148
153
is.Equal(len(pkg.Vars()), 0) // encoding should have no vars
0 commit comments