alias

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: May 21, 2023 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Add added in v0.10.1

func Add(url string, name string) error

Add alias if alias exists, overwrite url.

func AddInteractive added in v1.3.0

func AddInteractive() error

func ForeachAlias added in v1.2.0

func ForeachAlias(f func(*Model)) error

ForeachAlias collection alias and call func

func LsName added in v1.2.0

func LsName() error

LsName list alias names

Types

type Map

type Map map[string]*Model

func ReadToMap

func ReadToMap() (Map, error)

type Model

type Model struct {
	Time int64  // created time
	Url  string // url
	Name string // alias name
	// contains filtered or unexported fields
}

func Read

func Read() ([]*Model, error)

func Remove added in v0.10.1

func Remove(name string) (*Model, error)

Remove alias

func (*Model) Command added in v1.2.0

func (m *Model) Command(name string) *cobra.Command

func (*Model) String

func (m *Model) String() string

Jump to

Keyboard shortcuts

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