Documentation
¶
Index ¶
- Variables
- type GoMod
- func (g *GoMod) Changelog(from, to string) *result.Changelogs
- func (g *GoMod) Condition(source string, scm scm.ScmHandler) (pass bool, message string, err error)
- func (g *GoMod) Read(filename string) error
- func (g *GoMod) ReportConfig() interface{}
- func (g *GoMod) Source(workingDir string, resultSource *result.Source) error
- func (g *GoMod) Target(source string, scm scm.ScmHandler, dryRun bool, resultTarget *result.Target) (err error)
- type Spec
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 ¶
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(from, to string) *result.Changelogs
Changelog returns a link to the Golang version
func (*GoMod) ReportConfig ¶ added in v0.99.0
func (g *GoMod) ReportConfig() interface{}
ReportConfig returns a new configuration for this resource without any sensitive information or context specific information.
type Spec ¶
type Spec struct { // File defines the go.mod file, default to "go.mod" // // compatible: // * source // * condition // // remark: // * scheme "https://", "http://", and "file://" are supported in path for source and condition // File string `yaml:",omitempty"` // Module defines the module path // // compatible: // * source // * condition // // remark: // * scheme "https://", "http://", and "file://" are supported in path for source and condition // Module string `yaml:",omitempty"` // Indirect specifies if we manipulate an indirect dependency // // compatible: // * source // * condition // Indirect bool `yaml:",omitempty"` // Version Defines a specific golang version // // compatible: // * source // * condition // Version string `yaml:",omitempty"` // Replace specifies if we manipulate a replaced dependency // // compatible: // * source // * condition // * target // Replace bool `yaml:",omitempty"` // ReplaceVersion specifies the specific Go module version to replace // // compatible: // * source // * condition // * target // // default: unset, which will match any version of the module being replaced. // // Example: // For the following Go replace instruction: // moduleA v1.2.3 => moduleB v1.0.0 // - The 'module' field should be set to 'moduleA' (the module being replaced, left-hand side). // - The value of ReplaceVersion should be 'v1.2.3', corresponding to the version of moduleA // (the module being replaced, left-hand side). ReplaceVersion string `yaml:",omitempty"` }
Spec defines a specification for a "Golang" resource parsed from an updatecli manifest file
Click to show internal directories.
Click to hide internal directories.