gomodule

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DefaultResolver

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

DefaultResolver implements Resolver using go list.

func NewDefaultResolver

func NewDefaultResolver() *DefaultResolver

NewDefaultResolver creates a resolver that inherits GOPROXY from the environment.

func NewDefaultResolverWithGOPROXY

func NewDefaultResolverWithGOPROXY(goproxy string) *DefaultResolver

NewDefaultResolverWithGOPROXY creates a resolver that overrides GOPROXY when the provided value is non-empty.

func (*DefaultResolver) Check

func (r *DefaultResolver) Check(modulePath, installedVersion string) (Result, error)

Check asks the Go toolchain whether a newer module version is available.

type Resolver

type Resolver interface {
	Check(modulePath, installedVersion string) (Result, error)
}

Resolver checks module updates through the Go toolchain.

type Result

type Result struct {
	LatestVersion   string
	UpdateAvailable bool
}

Result describes the Go toolchain's update decision for an installed module.

func ParseUpdate

func ParseUpdate(data []byte) (Result, error)

ParseUpdate extracts the Go toolchain's update decision from go list JSON.

Jump to

Keyboard shortcuts

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