core

package
v0.0.19 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetImports

func GetImports(pkg string, filters ...FileFilter) (pkgimports map[string]StrSet, err error)

func PkgOfFile

func PkgOfFile(gofile string) (pkg string)

func WriteDot

func WriteDot(pkgimports map[string]StrSet, writer io.Writer) (err error)

Types

type FileFilter

type FileFilter struct {
	IsBlack bool
	Func    func(fp string, info os.FileInfo, err error) bool
}

func HasSuffix

func HasSuffix(isblack bool, suffixs ...string) FileFilter

func NameContains

func NameContains(isblack bool, str string) FileFilter

type PkgFilter

type PkgFilter func(map[string]StrSet) map[string]StrSet

func ParsePkgWildcardStr

func ParsePkgWildcardStr(str string) (fs []PkgFilter, err error)

func PkgLevelFilter

func PkgLevelFilter(level int) PkgFilter

func PkgWildcardFilter

func PkgWildcardFilter(isBlack bool, pkgs ...string) PkgFilter

func RootFilter

func RootFilter(root string) PkgFilter

type StrSet

type StrSet map[string]bool

func NewStrSet

func NewStrSet(strs ...string) StrSet

func ParseGoImport

func ParseGoImport(gofile string) (ss StrSet, err error)

func (StrSet) Array

func (this StrSet) Array() []string

func (StrSet) Contains

func (this StrSet) Contains(str string) (ok bool)

func (StrSet) Del

func (this StrSet) Del(str string)

func (StrSet) Merge

func (this StrSet) Merge(that StrSet)

func (StrSet) Put

func (this StrSet) Put(str string)

Jump to

Keyboard shortcuts

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