Categorygithub.com/lmika/shellwords
modulepackage
0.0.0-20140714114018-ce258dd729fe
Repository: https://github.com/lmika/shellwords.git
Documentation: pkg.go.dev

# README

shellwords

A simple string tokenizer for Go, inspired by Ruby's Shellwords module.

Shellwords supports tokens separated by whitespace or delimited by single or double quotes.

To get:

go get github.com/lmika/shellwords

To use:

package main

import "fmt"
import "shellwords"

func main() {
    shellwords.Split("these 'a three' tokens")  // ["these", "a three", "tokens"]
}

Documentation at http://godoc.org/github.com/lmika/shellwords

# Functions

New creates a new splitter for a given string.
Split is a conveinence method for splitting a string into tokens.

# Structs

Splitter is used to split an input string into tokens.