config

package
v0.0.0-...-05a1e4a Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// SearchNone is returned if no result is found
	SearchNone = SearchResult(0)
	// SearchNix is returned if a shell.nix is found
	SearchNix = SearchResult(1)
	// SearchTOML is returned if a devshell.toml is found
	SearchTOML = SearchResult(2)
)
View Source
const FileName = "devshell.toml"

FileName ...

Variables

This section is empty.

Functions

func Init

func Init(path string, name string, force bool) error

Init ...

func Print

func Print(c *Config) string

Print ...

Types

type Bash

type Bash struct {
	Extra       string `toml:"extra,omitempty"`
	Interactive string `toml:"interactive,omitempty"`
}

Bash ...

type Command

type Command struct {
	Category string `toml:"category,omitempty"`
	Command  string `toml:"command,omitempty"`
	Help     string `toml:"help,omitempty"`
	Name     string `toml:"name"`
	Package  string `toml:"package,omitempty"`
}

Command ...

type Config

type Config struct {
	Bash     Bash                   `toml:"bash,omitempty"`
	Commands []Command              `toml:"commands"`
	Devshell Devshell               `toml:"devshell,omitempty"`
	Env      map[string]interface{} `toml:"env"`
}

Config ...

func Load

func Load(path string) (*Config, error)

Load ...

type Devshell

type Devshell struct {
	Name     string   `toml:"name"`
	Packages []string `toml:"packages"`
	Motd     *string  `toml:"motd"`
}

Devshell ...

type SearchResult

type SearchResult int

SearchResult is an "enum" returned by the Search function

func Search(path string) (string, SearchResult)

Search for a config file from `path` to up.

Jump to

Keyboard shortcuts

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