package sample
Import Path
golang.org/x/pkgsite/internal/testing/sample (on go.dev)
Dependency Relation
imports 18 packages, and imported by one package
Involved Source Files
Package sample provides functionality for generating sample values of
the types contained in the internal package.
Package-Level Functions (total 21, in which 18 are exported)
Documentation returns a Documentation value for the given Go source.
It panics if there are errors parsing or encoding the source.
Module creates a Module with the given path and version.
The list of suffixes is used to create Units within the module.
func ModuleInfo(modulePath, versionString string) *internal.ModuleInfo
NowTruncated returns time.Now() truncated to Microsecond precision.
This makes it easier to work with timestamps in PostgreSQL, which have
Microsecond precision:
https://www.postgresql.org/docs/9.1/datatype-datetime.html
func PackageMeta(fullPath string) *internal.PackageMeta
ReplaceLicense replaces all licenses having the same file path as lic with lic.
UnitForPackage constructs a unit with the given module path and suffix.
If modulePath is the standard library, the package path is the
suffix, which must not be empty. Otherwise, the package path
is the concatenation of modulePath and suffix.
The package name is last component of the package path.
Package-Level Variables (total 24, all are exported)
These sample values can be used to construct test cases.
These sample values can be used to construct test cases.
These sample values can be used to construct test cases.
These sample values can be used to construct test cases.
These sample values can be used to construct test cases.
These sample values can be used to construct test cases.
These sample values can be used to construct test cases.
These sample values can be used to construct test cases.
These sample values can be used to construct test cases.
LicenseCmpOpts are options to use when comparing licenses with the cmp package.
These sample values can be used to construct test cases.
These sample values can be used to construct test cases.
These sample values can be used to construct test cases.
These sample values can be used to construct test cases.
These sample values can be used to construct test cases.
These sample values can be used to construct test cases.
These sample values can be used to construct test cases.
These sample values can be used to construct test cases.
These sample values can be used to construct test cases.
These sample values can be used to construct test cases.
These sample values can be used to construct test cases.
These sample values can be used to construct test cases.
These sample values can be used to construct test cases.
These sample values can be used to construct test cases.
![]() |
The pages are generated with Golds v0.3.2-preview. (GOOS=darwin GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds. |