utils

package
v0.0.0-...-3ab66a2 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2024 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Clamp

func Clamp(val *int, min, max int)

func FillLine

func FillLine(s string, r rune, width int) string

func GenerateCommand

func GenerateCommand(cmd string) (*exec.Cmd, error)

func RemoveLastRune

func RemoveLastRune(s string) string

func RemoveNRunes

func RemoveNRunes(s string, n int) string

Types

type Config

type Config struct {
	// contains filtered or unexported fields
}

func NewConfig

func NewConfig() (*Config, error)

func (*Config) AddEntry

func (c *Config) AddEntry(entry ListEntry)

func (*Config) GetList

func (c *Config) GetList() []ListEntry

func (*Config) RemoveEntry

func (c *Config) RemoveEntry(e *ListEntry)

func (*Config) Save

func (c *Config) Save() error

type ExecuteEvent

type ExecuteEvent struct {
	tcell.EventTime
	Command string
}

type ListEntry

type ListEntry struct {
	Name    string
	Command string
}

Jump to

Keyboard shortcuts

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