package source
Import Path
gotest.tools/v3/internal/source (on go.dev)
Dependency Relation
imports 13 packages, and imported by 2 packages
Involved Source Files
bazel.go
defers.go
Package source provides utilities for handling source-code.
update.go
version.go
Package-Level Type Names (total 2, neither is exported)
Package-Level Functions (total 17, in which 7 are exported)
CallExprArgs returns the ast.Expr slice for the args of an ast.CallExpr at
the index in the call stack.
FormatNode using go/format.Node and return the result as a string
FormattedCallExprArg returns the argument from an ast.CallExpr at the
index in the call stack. The argument is formatted using FormatNode.
GoVersionLessThan returns true if runtime.Version() is semantically less than
version major.minor. Returns false if a release version can not be parsed from
runtime.Version().
IsUpdate is returns true if the -update flag is set. It indicates the user
running the tests would like to update any golden values.
UpdateExpectedValue looks for a package-level variable with a name that
starts with expected in the arguments to the caller. If the variable is
found, the value of the variable will be updated to value of the other
argument to the caller.
UpdateVariable writes to filename the contents of astFile with the value of
the variable updated to value.
Package-Level Variables (total 8, in which 2 are exported)
ErrNotFound indicates that UpdateExpectedValue failed to find the
variable to update, likely because it is not a package level variable.
Update is a shim for testing, and for compatibility with the old -update-golden
flag.
The pages are generated with Golds v0.7.6. (GOOS=linux GOARCH=amd64)