cmdtype

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseResultVar added in v1.0.1

func ParseResultVar(s string) (cmd, resultVar string)

ParseResultVar parses the result variable from the end of command like ... => @xyz.

Types

type CmdType

type CmdType int

CmdType represents the cmd types.

const (
	// Noop means no operation cmd, its a placeholder for some purpose.
	Noop CmdType = iota
	// Local means the commands will be executed locally.
	Local
	// Ul uploads.
	Ul
	// Dl downloads.
	Dl
	// SSH means the ssh commands will executed by ssh in remote hosts.
	SSH
)

func Parse

func Parse(globalRemote bool, cmd string) (CmdType, string, string)

Parse parses the type of cmd, returns CmdType, host part and real cmd part.

Jump to

Keyboard shortcuts

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