Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var StringToListType = map[string]ListType{ "whitelist": LTWhitelist, "blacklist": LTBlacklist, }
StringToListType makes it easier to turn a string into a ListType. It assumes that the string representation is lower case.
Functions ¶
This section is empty.
Types ¶
type Depguard ¶
type Depguard struct { ListType ListType IncludeGoRoot bool Packages []string TestPackages []string // contains filtered or unexported fields }
Depguard checks imports to make sure they follow the given list and constraints.
type RootChecker ¶
type RootChecker struct {
// contains filtered or unexported fields
}
RootChecker checks if import paths point to root packages.
func NewRootChecker ¶
func NewRootChecker(buildCtx *build.Context) *RootChecker
NewRootChecker creates a new RootChecker instance using the build.Context given, or build.Default.
Click to show internal directories.
Click to hide internal directories.