Documentation
¶
Index ¶
- Constants
- func MajorPkg(u updater.Update) bool
- type Environment
- type Updater
- func (u *Updater) ApplyUpdate(ctx context.Context, update updater.Update) error
- func (u *Updater) Check(ctx context.Context, dep updater.Dependency, filter func(string) bool) (*updater.Update, error)
- func (u *Updater) Dependencies(_ context.Context) ([]updater.Dependency, error)
- func (u *Updater) Name() string
- type UpdaterOpt
Constants ¶
View Source
const ( GoModFn = "go.mod" GoSumFn = "go.sum" VendorModulesFn = "vendor/modules.txt" )
Variables ¶
This section is empty.
Functions ¶
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 (*Updater) Dependencies ¶
type UpdaterOpt ¶
type UpdaterOpt func(*Updater)
func WithMajorVersions ¶
func WithMajorVersions(major bool) UpdaterOpt
func WithTidy ¶
func WithTidy(tidy bool) UpdaterOpt
Click to show internal directories.
Click to hide internal directories.