commands

package
v0.0.0-...-572b5b8 Latest Latest
Warning

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

Go to latest
Published: Jan 26, 2020 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	LsCmd     = CommandEnum{"ls", 4, errors.New("argument size error. ls command can be used by -t ${tagName},-s ${searchWord} format and -g(grepmode option). "), Ls}
	AddCmd    = CommandEnum{"add", 5, errors.New("argument size error. add command can receive bookmarkId  and up to three tags. "), Add}
	RmCmd     = CommandEnum{"rm", 2, errors.New("argument size error. rm command can receive only bookmarkId . "), Rm}
	ImportCmd = CommandEnum{"import", 2, errors.New("argument size error. import command can receive chrome'sbookmark export file. "), Import}
	OpenCmd   = CommandEnum{"open", 2, errors.New("argument size error. open command can receive only bookmarkId. "), Open}
)

EnumValueList

Functions

func Add

func Add(c *cli.Context)

Add saves pagedata

func Commands

func Commands() []cli.Command

Commands return cli-command setting list .

func Import

func Import(c *cli.Context)

Import import chrome bookmark exports data on page-db.

func Ls

func Ls(c *cli.Context)

Ls returns bookmark list

func Open

func Open(c *cli.Context)

Open open bookmark website

func Rm

func Rm(c *cli.Context)

Rm delete pagedata

func Tags

func Tags(c *cli.Context)

Tags returns all tags on bookmarks

Types

type CommandEnum

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

CommandEnum defines each-command's argumentsSize, go-function.

func GetCommandEnum

func GetCommandEnum(commandName string) *CommandEnum

GetCommandEnum returns commandEnum type by commandname string.

func (*CommandEnum) Cmd

func (cmdEnum *CommandEnum) Cmd(c *cli.Context)

Cmd activate

func (*CommandEnum) GetArgSize

func (cmdEnum *CommandEnum) GetArgSize() int

GetArgSize returns how many arguments command can receive.

func (*CommandEnum) GetArgumentSizeErrorMessage

func (cmdEnum *CommandEnum) GetArgumentSizeErrorMessage() error

GetArgumentSizeErrorMessage returns argument-size error type

Jump to

Keyboard shortcuts

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