util

package
v1.3.3 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SaveConfig

func SaveConfig(cfgPath string, config Config) error

Types

type Command

type Command struct {
	Name      string
	Arguments []string
}

type Config

type Config struct {
	Name  string     `json:"name"`
	Cmd   string     `json:"cmd"`
	Set   []*Variant `json:"set,omitempty"`
	Unset []*Variant `json:"unset,omitempty"`
}

func ReadConfigs

func ReadConfigs(cfgPath string) ([]*Config, error)

type Variant

type Variant struct {
	Arguments    []string    `json:"args"`
	Type         VariantType `json:"type,omitempty"`
	Equator      string      `json:"equator,omitempty"`
	Surround     string      `json:"surround,omitempty"`
	DiscardProxy bool        `json:"discard,omitempty"`
}

func PromptVariants

func PromptVariants() []*Variant

type VariantType

type VariantType string
const (
	TEXT     VariantType = "text"
	VARIABLE VariantType = "variable"
)

Jump to

Keyboard shortcuts

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