New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

github.com/kballard/go-shellquote

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/kballard/go-shellquote

  • v0.0.0-20180428030007-95032a82bc51
  • Source
  • Go
  • Socket score

Version published
Created
Source

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.

FAQs

Package last updated on 28 Apr 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc