Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cosiner/argv
https://github.com/cosiner/argv
argv cmdline
Last synced: 10 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/cosiner/argv
- Owner: cosiner
- License: mit
- Created: 2017-01-22T10:37:21.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2020-04-16T04:13:15.000Z (over 4 years ago)
- Last Synced: 2024-07-31T20:41:26.562Z (3 months ago)
- Topics: argv, cmdline
- Language: Go
- Size: 16.6 KB
- Stars: 41
- Watchers: 3
- Forks: 8
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-go - argv - Go library to split command line string as arguments array using the bash syntax. (Command Line / Standard CLI)
- awesome-Char - argv - Go library to split command line string as arguments array using the bash syntax. (Command Line / Standard CLI)
- awesome-go - argv - Go library to split command line string as arguments array using the bash syntax. (Command Line / Standard CLI)
- fucking-awesome-go - argv - Go library to split command line string as arguments array using the bash syntax. (Command Line / Standard CLI)
- awesome-go-cn - argv
- awesome-go - argv - Go library to split command line string as arguments array using the bash syntax. (Command Line / Standard CLI)
- awesome-go - argv - Go library to split command line string as arguments array using the bash syntax. (Command Line / Standard CLI)
- awesome-go - argv - | - | - | (Command Line / Standard CLI)
- awesome-go - argv - Go library to split command line string as arguments array using the bash syntax. (Command Line / Standard CLI)
- awesome-go - argv - Go library to split command line string as arguments array using the bash syntax. - :arrow_down:2 - :star:8 (Command Line / Standard CLI)
- awesome-go - argv - ★ 9 (Command Line)
- awesome-go-extra - argv - 01-22T10:37:21Z|2020-04-16T04:13:15Z| (Build Automation / Standard CLI)
- awesome-go-cn - argv
- awesome-go-with-stars - argv - Go library to split command line string as arguments array using the bash syntax. (Command Line / Standard CLI)
- awesome-go - argv - 一个GO语言库,用于将将bash语法中的命令行字符串拆分为参数数组。 (<span id="命令行-command-line">命令行 Command Line</span> / 标准CLI)
- awesome-go-plus - argv - Go library to split command line string as arguments array using the bash syntax. (Command Line / Standard CLI)
- awesome-go-plus - argv - Go library to split command line string as arguments array using the bash syntax. (Command Line / Standard CLI)
README
# Argv
[![GoDoc](https://img.shields.io/badge/godoc-reference-blue.svg?style=flat)](https://godoc.org/github.com/cosiner/argv)
[![Build Status](https://travis-ci.org/cosiner/argv.svg?branch=master&style=flat)](https://travis-ci.org/cosiner/argv)
[![Coverage Status](https://coveralls.io/repos/github/cosiner/argv/badge.svg?style=flat)](https://coveralls.io/github/cosiner/argv)
[![Go Report Card](https://goreportcard.com/badge/github.com/cosiner/argv?style=flat)](https://goreportcard.com/report/github.com/cosiner/argv)Argv is a library for [Go](https://golang.org) to split command line string into arguments array.
# Documentation
Documentation can be found at [Godoc](https://godoc.org/github.com/cosiner/argv)# Example
```Go
func TestArgv(t *testing.T) {
args, err := Argv(" ls `echo /` | wc -l ", func(backquoted string) (string, error) {
return backquoted, nil
}, nil)
if err != nil {
t.Fatal(err)
}
expects := [][]string{
[]string{"ls", "echo /"},
[]string{"wc", "-l"},
}
if !reflect.DeepEqual(args, expects) {
t.Fatal(args)
}
}
```# LICENSE
MIT.