doctor

package
v0.0.0-...-2c04bb4 Latest Latest
Warning

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

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

Documentation

Overview

Package doctor provides a library for managing required tools, frameworks, etc on a system. E.g., it can be used by a project to let new developers check if their environment is ready for working on the project, and if not it can provide them with information on what is missing and what they can do to rectify that.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Doctor

func Doctor()

Doctor checks that the required tools and versions are currently installed on the user's system, and reports the status in the terminal

Types

type Config

type Config struct {
	Requirements []Requirement `yaml:"requirements"`
}

func ReadConfig

func ReadConfig() (Config, error)

type Requirement

type Requirement struct {
	// Tool specifies which tool this is.  If it's not a built-in one, then it
	// should be set to custom.
	// Expects lower case
	Name     string `yaml:"name"`
	Template string `yaml:"template"`
	Version  string `yaml:"version"`
	Command  string `yaml:"command"`
}

func (*Requirement) GetTool

func (r *Requirement) GetTool() (Tool, error)

type Status

type Status string
var (
	StatusNotFound    Status = "not_found"
	StatusPass        Status = "pass"
	StatusVersionFail Status = "invalid_version"
)

Jump to

Keyboard shortcuts

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