quoted

package standard library
go1.26.10 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 20, 2026 License: BSD-3-Clause Imports: 4 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package quoted provides string manipulation utilities.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Join

func Join(args []string) (string, error)

Join joins a list of arguments into a string that can be parsed with Split. Arguments are quoted only if necessary; arguments without spaces or quotes are kept as-is. No argument may contain both single and double quotes.

func Split

func Split(s string) ([]string, error)

Split splits s into a list of fields, allowing single or double quotes around elements. There is no unescaping or other processing within quoted fields.

Keep in sync with cmd/dist/quoted.go

Types

type Flag

type Flag []string

A Flag parses a list of string arguments encoded with Join. It is useful for flags like cmd/link's -extldflags.

func (*Flag) Set

func (f *Flag) Set(v string) error

func (*Flag) String

func (f *Flag) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL