lemon

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: May 2, 2016 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Success        = 0
	FlagParseError = iota + 10
	RPCError
	Help
)

Variables

View Source
var Usage = fmt.Sprintf(`Usage: lemonade [options]... SUB_COMMAND [arg]
Sub Commands:
  open [URL]                  Open URL by browser
  copy [text]                 Copy text.
  paste                       Paste text.
  server                      Start lemonade server.

Options:
  --port=2489                 TCP port number
  --line-ending               Convert Line Ending(CR/CRLF)
  --allow="0.0.0.0/0,::/0"    Allow IP Range             [Server only]
  --host="localhost"          Destination hostname       [Client only]
  --trans-loopback=true       Translate loopback address [open subcommand only]
  --trans-localfile=true      Translate local file path  [open subcommand only]
  --help                      Show this message


Version:
  %s`, Version)
View Source
var Version string

Functions

func ConvertLineEnding

func ConvertLineEnding(text, option string) string

Types

type CLI

type CLI struct {
	In       io.Reader
	Out, Err io.Writer

	Type       CommandType
	DataSource string

	// options
	Port           int
	Allow          string
	Host           string
	TransLoopback  bool
	TransLocalfile bool
	LineEnding     string

	Help bool
}

func (*CLI) FlagParse

func (c *CLI) FlagParse(args []string) error

type CommandStyle

type CommandStyle int
const (
	ALIAS CommandStyle = iota + 1
	SUBCOMMAND
)

type CommandType

type CommandType int
const (
	OPEN CommandType = iota + 1
	COPY
	PASTE
	SERVER
)

Commands

Jump to

Keyboard shortcuts

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