pkgtool

package
v0.0.0-...-63bff7e Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2018 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAllGopath

func GetAllGopath() []string

GetAllGopath 会返回GOPATH包含的所有路径。

func GetGoroot

func GetGoroot() string

GetGoroot 会返回GOROOT路径。

func GetSrcDirs

func GetSrcDirs(fresh bool) []string

GetSrcDirs 会返回所有已配置的Go源码路径。

Types

type PkgNode

type PkgNode struct {
	// contains filtered or unexported fields
}

PkgNode 代表代码包节点。

func NewPkgNode

func NewPkgNode(importPath string) *PkgNode

NewPkgNode 用于根据指定的代码包导入路径新建一个代码包节点。

func (*PkgNode) AddImportedNode

func (node *PkgNode) AddImportedNode(pn *PkgNode)

AddImportedNode 用于添加当前代码包导入的代码包的节点。

func (*PkgNode) AddImporter

func (node *PkgNode) AddImporter(pn *PkgNode)

AddImporter 用于添加导入当前代码包的代码包的节点。

func (*PkgNode) Grow

func (node *PkgNode) Grow() error

Grow 用于让当前代码包节点沿着代码包导入关系向下生长。

func (*PkgNode) ImportPath

func (node *PkgNode) ImportPath() string

ImportPath 用于获取代码包导入路径。

func (*PkgNode) ImportedNodes

func (node *PkgNode) ImportedNodes() []*PkgNode

ImportedNodes 用于获取当前代码包导入的所有代码包节点。

func (*PkgNode) Importers

func (node *PkgNode) Importers() []*PkgNode

Importers 用于获取导入当前代码包的所有代码包节点。

func (*PkgNode) IsLeaf

func (node *PkgNode) IsLeaf() bool

IsLeaf 用于判断当前节点是否为叶子节点。

func (*PkgNode) SrcDir

func (node *PkgNode) SrcDir() string

SrcDir 用于获取源目录的路径。

Jump to

Keyboard shortcuts

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