You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Mura Li d77176912b Use Go1.11 module (#5743)
* Migrate to go modules

* make vendor

* Update mvdan.cc/xurls

* make vendor

* Update code.gitea.io/git

* make fmt-check

* Update github.com/go-sql-driver/mysql

* make vendor
5 years ago
..
LICENSE Add support for extra sendmail arguments (#2731) 7 years ago
README Use Go1.11 module (#5743) 5 years ago
doc.go Add support for extra sendmail arguments (#2731) 7 years ago
quote.go Add support for extra sendmail arguments (#2731) 7 years ago
unquote.go Add support for extra sendmail arguments (#2731) 7 years ago

README

PACKAGE

package shellquote
    import "github.com/kballard/go-shellquote"

    Shellquote provides utilities for joining/splitting strings using sh's
    word-splitting rules.

VARIABLES

var (
    UnterminatedSingleQuoteError = errors.New("Unterminated single-quoted string")
    UnterminatedDoubleQuoteError = errors.New("Unterminated double-quoted string")
    UnterminatedEscapeError      = errors.New("Unterminated backslash-escape")
)


FUNCTIONS

func Join(args ...string) string
    Join quotes each argument and joins them with a space. If passed to
    /bin/sh, the resulting string will be split back into the original
    arguments.

func Split(input string) (words []string, err error)
    Split splits a string according to /bin/sh's word-splitting rules. It
    supports backslash-escapes, single-quotes, and double-quotes. Notably it
    does not support the $'' style of quoting. It also doesn't attempt to
    perform any other sort of expansion, including brace expansion, shell
    expansion, or pathname expansion.

    If the given input has an unterminated quoted string or ends in a
    backslash-escape, one of UnterminatedSingleQuoteError,
    UnterminatedDoubleQuoteError, or UnterminatedEscapeError is returned.