cockroach: github.com/cockroachdb/cockroach/pkg/testutils/buildutil Index | Files

package buildutil

import "github.com/cockroachdb/cockroach/pkg/testutils/buildutil"

Index

Package Files

build.go

func VerifyNoImports Uses

func VerifyNoImports(
    t testing.TB,
    pkgPath string,
    cgo bool,
    forbiddenPkgs, forbiddenPrefixes []string,
    allowlist ...string,
)

VerifyNoImports verifies that a package doesn't depend (directly or indirectly) on forbidden packages. The forbidden packages are specified as either exact matches or prefix matches. A match is not reported if the package that includes the forbidden package is listed in the allowlist. If GOPATH isn't set, it is an indication that the source is not available and the test is skipped.

func VerifyTransitiveAllowlist Uses

func VerifyTransitiveAllowlist(t testing.TB, pkg string, allowedPkgs []string)

VerifyTransitiveAllowlist checks that the entire set of transitive dependencies of the given package is in a allowlist. Vendored and stdlib packages are always allowed.

Package buildutil imports 6 packages (graph) and is imported by 2 packages. Updated 2020-08-05. Refresh now. Tools for package owners.