dependency

package
v1.2.5-alpha-3 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2024 License: LGPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Git = Dependency{
		Name: "Git",
		Cmd:  exec.Command("git", "--version"),
		Help: `Git is required to clone the starter-game-template.
Learn how to install Git: https://github.com/git-guides/install-git`,
	}
	Go = Dependency{
		Name: "Go",
		Cmd:  exec.Command("go", "version"),
		Help: `Go is required to build and run World Engine game shards.
Learn how to install Go: https://go.dev/doc/install`,
	}
	Docker = Dependency{
		Name: "Docker",
		Cmd:  exec.Command("docker", "--version"),
		Help: `Docker is required to build and run World Engine game shards.
Learn how to install Docker: https://docs.docker.com/engine/install/`,
	}
	DockerCompose = Dependency{
		Name: "Docker Compose",
		Cmd:  exec.Command("docker", "compose", "version"),
		Help: `Docker Compose is required to build and run World Engine game shards.
Learn how to install Docker: https://docs.docker.com/engine/install/`,
	}
	DockerDaemon = Dependency{
		Name: "Docker daemon is running",
		Cmd:  exec.Command("docker", "info"),
		Help: `Docker daemon needs to be running.
If you use Docker Desktop, make sure that you have ran it`,
	}
	AlwaysFail = Dependency{
		Name: "Always fails",
		Cmd:  exec.Command("false"),
		Help: `This dependency check will always fail. It can be used for testing.`,
	}
)

Functions

func Check

func Check(deps ...Dependency) error

Types

type Dependency

type Dependency struct {
	Name string
	Cmd  *exec.Cmd
	Help string
}

func (Dependency) Check

func (d Dependency) Check() error

Jump to

Keyboard shortcuts

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