Documentation
¶
Index ¶
- Variables
- func AllGoPaths() []string
- func DirPathToImportPath(dirpath string) string
- func GopathSrc(subDirNames ...string) (gps string)
- func GopathSrcGithub(gitHubName string, subDirNames ...string) string
- func Gorename(cmdname string, filepath string, offset int, newname string, eol string) (fileedits udev.SrcMsgs, err error)
- func GuruMinimalScopeFor(goFilePath string) (pkgScope string, shouldRefresh bool)
- func HasGoDevEnv() bool
- func LintCheck(cmdname string, pkgimppath string) (msgs udev.SrcMsgs)
- func LintErrcheck(pkgimppath string) (msgs udev.SrcMsgs)
- func LintGoConst(dirpath string) (msgs udev.SrcMsgs)
- func LintGoSimple(pkgimppath string) (msgs udev.SrcMsgs)
- func LintGoVet(pkgimppath string) udev.SrcMsgs
- func LintGolint(pkgimppathordirpath string) (msgs udev.SrcMsgs)
- func LintHonnef(cmdname string, pkgimppath string) (msgs udev.SrcMsgs)
- func LintIneffAssign(dirrelpath string) (msgs udev.SrcMsgs)
- func LintMvDan(cmdname string, pkgimppath string) udev.SrcMsgs
- func LintViaPkgImpPath(cmdname string, pkgimppath string, inclstderr bool) (msgs udev.SrcMsgs)
- func PkgImpPathsToNamesInLn(ln string, curPkgDir string) string
- func PkgsByName(name string) (pkgImpPaths []string)
- func QueryCallees_Guru(fullsrcfilepath string, srcin string, bytepos1 string, bytepos2 string, ...) (gc *gurujson.Callees, err error)
- func QueryCallers_Guru(fullsrcfilepath string, srcin string, bytepos1 string, bytepos2 string, ...) (gr []gurujson.Caller, err error)
- func QueryCallstack_Guru(fullsrcfilepath string, srcin string, bytepos1 string, bytepos2 string, ...) (gcs *gurujson.CallStack, err error)
- func QueryCmplSugg_Gocode(fullsrcfilepath string, srcin string, pos string) (cmpls []map[string]string, err error)
- func QueryDefDecl_GoDef(fullsrcfilepath string, srcin string, bytepos string) (defdecl string)
- func QueryDefLoc_Godef(fullsrcfilepath string, srcin string, bytepos string) *udev.SrcMsg
- func QueryDefLoc_Gogetdoc(fullsrcfilepath string, srcin string, bytepos string) *udev.SrcMsg
- func QueryDef_Guru(fullsrcfilepath string, srcin string, bytepos string) *gurujson.Definition
- func QueryFreevars_Guru(fullsrcfilepath string, srcin string, bytepos1 string, bytepos2 string) (gfvs []*gurujson.FreeVar, err error)
- func QueryImpl_Guru(fullsrcfilepath string, srcin string, bytepos string) *gurujson.Implements
- func QueryPeers_Guru(fullsrcfilepath string, srcin string, bytepos1 string, bytepos2 string, ...) (gp *gurujson.Peers, err error)
- func QueryPointsto_Guru(fullsrcfilepath string, srcin string, bytepos1 string, bytepos2 string, ...) (gr []gurujson.PointsTo, err error)
- func QueryRefs_Guru(fullsrcfilepath string, srcin string, bytepos string) (refs []gurujson.Ref)
- func QueryWhat_Guru(fullsrcfilepath string, srcin string, bytepos string) (*gurujson.What, error)
- func QueryWhicherrs_Guru(fullsrcfilepath string, srcin string, bytepos1 string, bytepos2 string, ...) (gwe *gurujson.WhichErrs, err error)
- func RefreshPkgs() error
- type Gogetdoc
- type Guru
- type PackageError
- type Pkg
Constants ¶
This section is empty.
Variables ¶
View Source
var ( GoVersion string GoVersionShort string GoPaths []string Has_godoc bool Has_gofmt bool Has_goimports bool Has_goreturns bool Has_guru bool Has_gorename bool Has_godef bool Has_gogetdoc bool Has_gocode bool Has_structlayout bool Has_godocdown bool Has_golint bool Has_checkvar bool Has_checkalign bool Has_checkstruct bool Has_errcheck bool Has_ineffassign bool Has_interfacer bool Has_unparam bool Has_unindent bool Has_unconvert bool Has_maligned bool Has_goconst bool Has_gosimple bool Has_unused bool Has_staticcheck bool Has_deadcode bool )
View Source
var ( PkgsByDir map[string]*Pkg PkgsByImP map[string]*Pkg PkgsErrs []*Pkg ShortenImpPaths *strings.Replacer )
View Source
var ( GuruScopes string GuruScopeExclPkgs = map[string]bool{} )
View Source
var (
GolintIgnoreSubstrings = []string{
" should have comment ",
"ALL_CAPS",
"underscore",
"CamelCase",
"it will be inferred from the right-hand side",
"should be of the form \"",
}
)
Functions ¶
func AllGoPaths ¶
func AllGoPaths() []string
Returns all paths listed in the `GOPATH` environment variable, for users who don't care about calling HasGoDevEnv.
func DirPathToImportPath ¶
func GopathSrc ¶
Returns the `path/filepath.Join`-ed full directory path for a specified `$GOPATH/src` sub-directory. Example: `util.GopathSrc("tools", "importers", "sql")` yields `c:\gd\src\tools\importers\sql` if `$GOPATH` is `c:\gd`.
func GopathSrcGithub ¶
Returns the `path/filepath.Join`-ed full directory path for a specified `$GOPATH/src/github.com` sub-directory. Example: `util.GopathSrcGithub("go-util", "num")` yields `c:\gd\src\github.com\go-util\num` if `$GOPATH` is `c:\gd`.
func GuruMinimalScopeFor ¶
func HasGoDevEnv ¶
func HasGoDevEnv() bool
func LintErrcheck ¶
func LintErrcheck(pkgimppath string) (msgs udev.SrcMsgs)
func LintGoConst ¶
func LintGoConst(dirpath string) (msgs udev.SrcMsgs)
func LintGoSimple ¶
func LintGoSimple(pkgimppath string) (msgs udev.SrcMsgs)
func LintGolint ¶
func LintGolint(pkgimppathordirpath string) (msgs udev.SrcMsgs)
func LintHonnef ¶
func LintIneffAssign ¶
func LintIneffAssign(dirrelpath string) (msgs udev.SrcMsgs)
func LintViaPkgImpPath ¶
func PkgImpPathsToNamesInLn ¶
func PkgsByName ¶
func QueryCallees_Guru ¶
func QueryCallers_Guru ¶
func QueryCallstack_Guru ¶
func QueryCmplSugg_Gocode ¶
func QueryDefDecl_GoDef ¶
func QueryDefLoc_Godef ¶
func QueryDefLoc_Gogetdoc ¶
func QueryDef_Guru ¶
func QueryDef_Guru(fullsrcfilepath string, srcin string, bytepos string) *gurujson.Definition
func QueryFreevars_Guru ¶
func QueryImpl_Guru ¶
func QueryImpl_Guru(fullsrcfilepath string, srcin string, bytepos string) *gurujson.Implements
func QueryPeers_Guru ¶
func QueryPointsto_Guru ¶
func QueryRefs_Guru ¶
func QueryWhat_Guru ¶
func QueryWhicherrs_Guru ¶
func RefreshPkgs ¶
func RefreshPkgs() error
Types ¶
type Gogetdoc ¶
type Gogetdoc struct { Name string `json:"name,omitempty"` ImpP string `json:"import,omitempty"` Decl string `json:"decl,omitempty"` Doc string `json:"doc,omitempty"` DocUrl string `json:",omitempty"` Pos string `json:"pos,omitempty"` Pkg string `json:"pkg,omitempty"` // ImpS string `json:",omitempty"` ImpN string `json:",omitempty"` Type string `json:",omitempty"` Err string `json:",omitempty"` ErrMsgs string `json:",omitempty"` }
type Guru ¶
type Guru struct { gurujson.Describe IsLessThan func(*gurujson.DescribeMember, *gurujson.DescribeMember) bool `json:"-"` }
func QueryDesc_Guru ¶
type PackageError ¶
type PackageError struct { ImportStack []string // shortest path from package named on command line to this one Pos string // position of error (if present, file:line:col) Err string // the error itself }
copied over from `go list` src because that cmd outputs this stuff but one cannot import it from anywhere
type Pkg ¶
type Pkg struct { ApproxLoC int // 0 unless/until calling CountLoC() build.Package Errs udev.SrcMsgs Deps []string `json:",omitempty"` // all (recursively) imported dependencies Target string `json:",omitempty"` // install path Shlib string `json:",omitempty"` // the shared library that contains this package (only set when -linkshared) StaleReason string `json:",omitempty"` // why is Stale true? Stale bool `json:",omitempty"` // would 'go install' do anything for this package? Standard bool `json:",omitempty"` // is this package part of the standard Go library? Incomplete bool `json:",omitempty"` // was there an error loading this package or dependencies? Error *PackageError `json:",omitempty"` // error loading this package (not dependencies) DepsErrors []*PackageError `json:",omitempty"` // errors loading dependencies // contains filtered or unexported fields }
func PkgsForFiles ¶
func (*Pkg) Dependants ¶
func (*Pkg) GoFilePaths ¶
func (*Pkg) IsSortedPriorTo ¶
func (*Pkg) IsSortedPriorToByDeps ¶
Click to show internal directories.
Click to hide internal directories.