deps

package
v1.5.5 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// 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",
	}
)

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) error

InstallDependencies makes sure to install provided dependencies

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