gomod

package
v0.0.0-...-9878773 Latest Latest
Warning

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

Go to latest
Published: May 9, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	VersionCmd     command = "go version"
	RootModuleCmd  command = "go list -mod readonly -json -m"
	ModulesCmd     command = "go list -deps -json ./..."
	GraphModuleCmd command = "go mod graph"
)

Functions

This section is empty.

Types

type Decoder

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

Decoder

func NewDecoder

func NewDecoder(r io.Reader) *Decoder

NewDecoder ...

func (*Decoder) ConvertJSONReaderToModules

func (d *Decoder) ConvertJSONReaderToModules(path string, modules *[]meta.Package) error

ConvertJSONReaderToModules ...

func (*Decoder) ConvertJSONReaderToSingleModule

func (d *Decoder) ConvertJSONReaderToSingleModule(module *meta.Package) error

ConvertJSONReaderToSingleModule ...

func (*Decoder) ConvertPlainReaderToModules

func (d *Decoder) ConvertPlainReaderToModules(modules []meta.Package) error

ConvertPlainReaderToModules... todo: improve code below

type JSONOutput

type JSONOutput struct {
	Dir        string  `json:"Dir,omitempty"`
	ImportPath string  `json:"ImportPath,omitempty"`
	Name       string  `json:"Name,omitempty"`
	Module     *Module `json:"Module,omitempty"`
}

type Mod

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

func New

func New() *Mod

New ...

func (*Mod) GetMetadata

func (m *Mod) GetMetadata() plugin.Metadata

GetMetadata ...

func (*Mod) GetRootModule

func (m *Mod) GetRootModule(path string) (*meta.Package, error)

GetRootModule...

func (*Mod) GetVersion

func (m *Mod) GetVersion() (string, error)

GetVersion...

func (*Mod) HasModulesInstalled

func (m *Mod) HasModulesInstalled(path string) error

HasModulesInstalled ...

func (*Mod) IsValid

func (m *Mod) IsValid(path string) bool

IsValid ...

func (*Mod) ListModulesWithDeps

func (m *Mod) ListModulesWithDeps(path string, globalSettingFile string) ([]meta.Package, error)

ListModulesWithDeps ...

func (*Mod) ListUsedModules

func (m *Mod) ListUsedModules(path string) ([]meta.Package, error)

ListUsedModules...

func (*Mod) SetRootModule

func (m *Mod) SetRootModule(path string) error

SetRootModule ...

type Module

type Module struct {
	Version   string     `json:"Version,omitempty"`
	Path      string     `json:"Path,omitempty"`
	Dir       string     `json:"Dir,omitempty"`
	Replace   modReplace `json:"Replace,omitempty"`
	GoMod     string     `json:"GoMod,omitempty"`
	GoVersion string     `json:"GoVersion,omitempty"`
}

Jump to

Keyboard shortcuts

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