importguard

package module
v0.0.0-...-691035c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 19, 2022 License: MIT Imports: 8 Imported by: 0

README

importguard(WIP)

go linter that check if the specified package imports a package that is not allowed

requirement

  • Ability to specify specified packages and disallowed packages
  • An error occurs if a disallowed package is specified
  • The specified package can contain multiple disallowed packages

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Analyzer = &analysis.Analyzer{
	Name: "importguard",
	Doc:  doc,
	Run:  run,
	Requires: []*analysis.Analyzer{
		inspect.Analyzer,
	},
}

Functions

This section is empty.

Types

type PackagePair

type PackagePair struct {
	Target   string   `json:"target"`
	Packages []string `json:"packages"`
}

type PackagePairs

type PackagePairs []PackagePair

func (PackagePairs) Contain

func (ps PackagePairs) Contain(target string) ([]string, bool)

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL