golang

package
v0.0.0-...-eca8a8d Latest Latest
Warning

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

Go to latest
Published: May 18, 2021 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DMUnknown represents an unrecognised dependency method.
	DMUnknown = "unknown"
	// DMGoMod represents a go.mod/go.sum project.
	DMGoMod = "modules"
)

Variables

View Source
var (
	ErrUnknownDep    = errors.New("golang: unknown dependency method")
	ErrModIncomplete = errors.New("golang: incomplete go.mod file")
)

Errors returned by the plugin.

Functions

This section is empty.

Types

type Config

type Config struct {
	// Version of Go used.
	Version string
	// Method for declaring dependencies.
	DependencyMode DependencyMode
	// Build tags.
	Tags []string
}

Config for the Go plugin.

type DependencyMode

type DependencyMode string

DependencyMode describes all the supported methods for dependency resolution.

type Plugin

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

Plugin for Go ecosystem.

func NewPlugin

func NewPlugin() *Plugin

NewPlugin creates a new Go plugin with correct defaults.

func (*Plugin) Build

func (p *Plugin) Build(ctx context.Context, platform *specs.Platform, build cib.Service) (*llb.State, *dockerfile2llb.Image, error)

Build the image for this Go project.

func (*Plugin) Detect

func (p *Plugin) Detect(ctx context.Context, src client.Reference, config *config.Config) error

Detect if this is a Go project and identify the context.

Jump to

Keyboard shortcuts

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