Skip to content

Commit

Permalink
Add a note about github.com/kballard/go-shellquote
Browse files Browse the repository at this point in the history
  • Loading branch information
Arthur Axel 'fREW' Schmidt committed Jul 6, 2018
1 parent 3d87e6b commit ffb2251
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,12 @@ Sometimes you get strings from the internet and need to quote them for security,
other times you'll need to quote your own strings because doing it by hand is
just too much work.

Another option is <a href="http://github.com/kballard/go-shellquote">http://github.com/kballard/go-shellquote</a>. The quoting algorithms are
completely different and the results vary as well, but both produce working
results in my brief testing. See
<a href="https://github.com/frioux/go-scraps/tree/master/cmd/quotetest">https://github.com/frioux/go-scraps/tree/master/cmd/quotetest</a> for a tool that
shows the results of quoting with each package.



#### <a name="example_">Example</a>
Expand Down Expand Up @@ -54,7 +60,7 @@ byte.



## <a name="Quote">func</a> [Quote](https://github.com/frioux/shellquote/tree/master/shellquote.go?s=520:559#L21)
## <a name="Quote">func</a> [Quote](https://github.com/frioux/shellquote/tree/master/shellquote.go?s=845:884#L27)
``` go
func Quote(in []string) (string, error)
```
Expand Down
6 changes: 6 additions & 0 deletions shellquote.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ shellquote quotes strings for shell scripts.
Sometimes you get strings from the internet and need to quote them for security,
other times you'll need to quote your own strings because doing it by hand is
just too much work.
Another option is http://github.com/kballard/go-shellquote. The quoting algorithms are
completely different and the results vary as well, but both produce working
results in my brief testing. See
https://github.com/frioux/go-scraps/tree/master/cmd/quotetest for a tool that
shows the results of quoting with each package.
*/
package shellquote

Expand Down

0 comments on commit ffb2251

Please sign in to comment.