item

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Item

type Item struct {
	Type  itype.ItemType `yaml:"type" validate:"required,item_type"`
	Name  string         `yaml:"name,omitempty"`
	Value string         `yaml:"value" validate:"required"`
	Items []Item         `yaml:"items,omitempty"`

	// Add a branch that checks for the existence of the corresponding command
	Command string `yaml:"command,omitempty"`
	// Add a branch that checks for the existence of the corresponding directory
	Directory string `yaml:"directory,omitempty"`

	// Output scripts only if applicable to the OS on which they were executed
	OS []ostype.OS `yaml:"os,omitempty" validate:"dive,os"`
	// Output scripts only if applicable to the shell on which they were executed
	Shell []shell.Shell `yaml:"shell,omitempty" validate:"dive,shell"`

	// Inject a title comment into the script
	Title string `yaml:"title,omitempty"`
	// Ignore this item
	Disabled bool `yaml:"disabled,omitempty"`
	// Add a blank line break below this item
	LF int `yaml:"lf,omitempty" validate:"lt=20"`
}

func GetEnabledItems

func GetEnabledItems(items []Item, o ostype.OS, sh shell.Shell) []Item

func (Item) Validate

func (i Item) Validate() error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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