golist

package
v0.14.3 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2023 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FS added in v0.12.0

type FS interface {
	fs.FS
	RootDir() string
}

type Module

type Module struct {
	Path      string `json:"Path"`
	Main      bool   `json:"Main"`
	Dir       string `json:"Dir"`
	GoMod     string `json:"GoMod"`
	GoVersion string `json:"GoVersion"`
}

type Package

type Package struct {
	Dir            string   `json:"Dir"`
	ImportPath     string   `json:"ImportPath"`
	Name           string   `json:"Name"`
	Root           string   `json:"Root"`
	Module         Module   `json:"Module"`
	Match          []string `json:"Match"`
	Stale          bool     `json:"Stale"`
	StaleReason    string   `json:"StaleReason"`
	GoFiles        []string `json:"GoFiles"`
	TestGoFiles    []string `json:"TestGoFiles"`
	XTestGoFiles   []string `json:"XTestGoFiles"`
	IgnoredGoFiles []string `json:"IgnoredGoFiles"`
	Imports        []string `json:"Imports"`
	Deps           []string `json:"Deps"`
}

func DirPackages

func DirPackages(ctx context.Context, dfs FS, args ...string) ([]Package, error)

DirPackages - walk fs and collects all go packages found on directory.

type PackageRetriever

type PackageRetriever interface {
	Retrieve(ctx context.Context) ([]Package, error)
}

func NewRetriever

func NewRetriever(fs FS, goBuildTags ...string) PackageRetriever

Jump to

Keyboard shortcuts

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