app

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2022 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func OutputDepGraph

func OutputDepGraph(path, findPkgName string, isShowStdLib, isShowThirdLib, isReverse, isModGraph bool) error

func OutputDepGraphviz

func OutputDepGraphviz(path, findPkgName string, isShowStdLib, isShowThirdLib, isReverse, isModGraph bool, output string) error

func OutputGraphFormat

func OutputGraphFormat(w io.Writer, path, findPkgName string, isShowStdLib, isShowThirdLib, isReverse, modGraph bool) error

func OutputModGraphReverse

func OutputModGraphReverse(w io.Writer, links []ModGraphLink, findModule string, isTree bool) error

func ReadDirImportPkgs

func ReadDirImportPkgs(path, parentDirPath, module string, pkgMap PkgMap) error

func ReadGoFilesImportPkgs

func ReadGoFilesImportPkgs(path, parentDirPath, module string, goFiles []string, pkgMap PkgMap) error

func ReadGoModule

func ReadGoModule(path string) (string, error)

func Serve

func Serve(path, addr, findPkgName string, isShowStdLib, isShowThirdLib, isReverse bool) error

Types

type ModGraphLink struct {
	Source string
	Target string
}

type ModuleGraphNode

type ModuleGraphNode struct {
	Name    string
	PkgType PkgType
	Deps    []*ModuleGraphNode
	Parent  *ModuleGraphNode `json:"-"`
	Index   int
	Depth   int
}

type PkgMap

type PkgMap map[string]map[string]PkgTypeInfo

type PkgType

type PkgType int
const (
	PkgTypeStandard PkgType = iota
	PkgTypeCurrentModule
	PkgTypeThirdModule
)

type PkgTypeInfo

type PkgTypeInfo struct {
	IsRoot  bool
	PkgType PkgType
}

Jump to

Keyboard shortcuts

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