deps

package
v1.5.50 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Docker describes the docker dependency
	Docker = &Dependency{
		Bin: "docker",
	}
	// Yamllint describes the yamllint dependency
	Yamllint = &Dependency{
		Bin: "yamllint",
	}
	// Golint describes the golint dependency
	Golint = &Dependency{
		Bin:       "golint",
		GoInstall: "golang.org/x/lint/golint@latest",
	}
	// Htmltest describes the htmltest dependency
	Htmltest = &Dependency{
		Bin:       "htmltest",
		GoInstall: "github.com/wjdp/htmltest@latest",
	}
	// Hugo describes the hugo dependency
	Hugo = &Dependency{
		Bin:       "hugo",
		GoInstall: "-tags extended github.com/gohugoio/hugo@latest",
	}
)
View Source
var (
	// ExternalDependencies define the external app dependencies needed
	// to fullfill all automation tasks
	ExternalDependencies = []*Dependency{
		Golint,
	}
)

Functions

func CheckDependencies

func CheckDependencies(ctx context.Context, dependencies ...*Dependency) error

CheckDependencies determines if provided dependencies are available. If binary is not available os.ErrNotExist is returned

func InstallDependencies

func InstallDependencies(ctx context.Context, dependencies ...*Dependency) (bool, error)

InstallDependencies makes sure to install provided dependencies and return if all installing all dependencies were successful

Types

type Dependency

type Dependency struct {
	Bin       string
	GoInstall string
}

Dependency encapsulates attributes of a depending application

func (*Dependency) Install

func (d *Dependency) Install(ctx context.Context) (result bool, err error)

Install will install the dependency

type Installable

type Installable interface {
	Install() error
}

Installable describes something that can be installed

Jump to

Keyboard shortcuts

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