Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GoGetCommand ¶
func GoGetCommand(deps Dependencies) string
GoGetCommand returns a go get command that installs the provided dependencies and versions.
func WriteVersionTable ¶
func WriteVersionTable(w io.Writer, old, new Dependencies)
WriteVersionTable writes to w an ascii table showing the dependency versions that have changed between old and new. Dependencies present in old but not present in new are not printed out, and all dependencies in new are assumed to be also in old. This function is meant to be called with the output of Match as the value of new.
Types ¶
type Dependencies ¶
func FromGomod ¶
func FromGomod(gomod []byte) (Dependencies, error)
FromGomod returns a map of dependencies given the contents of a go.mod file.
func FromGomodFile ¶
func FromGomodFile(path string) (Dependencies, error)
FromGomodFile returns a map of dependencies given the path to a local go.mod file.
func FromModule ¶
func FromModule(pkg, version string) (Dependencies, error)
FromModule returns a map of dependencies for a given go module, given its name and version. It retrieves the go.mod file from proxy.golang.org.
func Mismatched ¶
func Mismatched(own, parent Dependencies) Dependencies
Mismatched looks at the dependencies of a package and its parent, and returns the dependencies that are present in both packages with the version they have on the parent package.