golist

package
v0.2.8 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	RootPath        string              // RootPath is the path to the root of a multi-module git repository.
	ShortenModPath  func(string) string // ShortenModPath shortens a module's import path to be a relative path from the RootPath.
	LengthenModPath func(string) string // LengthenModPath lengthens a module's import path to be the full import path.
}

Client gets information about Go modules and packages.

func (Client) Checksum

func (c Client) Checksum(mod, version string) (string, error)

Checksum returns the given module's Go checksum at the specified version.

func (Client) Dependencies

func (c Client) Dependencies(mod string) ([]string, error)

Dependencies returns a list of all modules that the module mod depends on.

func (Client) Packages

func (c Client) Packages(mod string) ([]string, error)

Packages returns a slice of packages that are part of the module mod.

func (Client) Tidy

func (c Client) Tidy(mod string) error

Tidy runs go mod tidy on the specified module.

type ModuleClient

type ModuleClient interface {
	Dependencies(mod string) ([]string, error)
	Packages(mod string) ([]string, error)
	Checksum(mod, version string) (string, error)
	Tidy(mod string) error
}

ModuleClient gets dependency and package information about go modules.

Jump to

Keyboard shortcuts

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