gomod

package
v0.75.0 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrModuleNotFound error = errors.New("GO module not found")
)
View Source
var (
	// ErrWrongSpec is returned when the Spec has wrong content
	ErrWrongSpec error = errors.New("wrong spec content")
)

Functions

This section is empty.

Types

type GoMod

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

GoMod defines a resource of type "go language"

func New

func New(spec interface{}) (*GoMod, error)

New returns a reference to a newly initialized Go Module object from a godmodule.Spec or an error if the provided Spec triggers a validation error.

func (*GoMod) Changelog

func (g *GoMod) Changelog() string

Changelog returns a link to the Golang version

func (*GoMod) Condition

func (g *GoMod) Condition(source string, scm scm.ScmHandler) (pass bool, message string, err error)

Condition checks if a specific stable Golang version is published

func (*GoMod) Source

func (g *GoMod) Source(workingDir string, resultSource *result.Source) error

Source returns the latest go module version

func (*GoMod) Target

func (g *GoMod) Target(source string, scm scm.ScmHandler, dryRun bool, resultTarget *result.Target) (err error)

Target is not supported for the Golang resource

type Spec

type Spec struct {
	// File defines the go.mod file, default to "go.mod"
	File string `yaml:",omitempty"`
	// Module defines the module path
	Module string `yaml:",omitempty"`
	// Indirect specifies if we manipulate an indirect dependency
	Indirect bool `yaml:",omitempty"`
	// Version Defines a specific golang version
	Version string `yaml:",omitempty"`
}

Spec defines a specification for a "Golang" resource parsed from an updatecli manifest file

Jump to

Keyboard shortcuts

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