gomodules

package
v0.0.0-...-b2c7de9 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2021 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const (
	GoModFn         = "go.mod"
	GoSumFn         = "go.sum"
	VendorModulesFn = "vendor/modules.txt"
)

Variables

This section is empty.

Functions

func MajorPkg

func MajorPkg(u updater.Update) bool

Types

type Environment

type Environment struct {
	updateaction.Environment
	Tidy bool `env:"INPUT_TIDY" envDefault:"true"`
}

func (*Environment) NewUpdater

func (c *Environment) NewUpdater(root string) updater.Updater

type Updater

type Updater struct {

	// MajorVersion attempts major package versions, e.g. github.com/foo/bar/v2 -> github.com/foo/bar/v3
	MajorVersions bool
	// Tidy toggles `go mod tidy` after an update
	Tidy bool
	// contains filtered or unexported fields
}

func NewUpdater

func NewUpdater(root string, opts ...UpdaterOpt) *Updater

func (*Updater) ApplyUpdate

func (u *Updater) ApplyUpdate(ctx context.Context, update updater.Update) error

func (*Updater) Check

func (u *Updater) Check(ctx context.Context, dep updater.Dependency, filter func(string) bool) (*updater.Update, error)

func (*Updater) Dependencies

func (u *Updater) Dependencies(_ context.Context) ([]updater.Dependency, error)

func (*Updater) Name

func (u *Updater) Name() string

type UpdaterOpt

type UpdaterOpt func(*Updater)

func WithMajorVersions

func WithMajorVersions(major bool) UpdaterOpt

func WithTidy

func WithTidy(tidy bool) UpdaterOpt

Jump to

Keyboard shortcuts

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