xml: aqwari.net/xml/internal/commandline Index | Files

package commandline

import "aqwari.net/xml/internal/commandline"

Package commandline contains helper types for collecting command-line arguments.

Index

Package Files

cli.go

type ReplaceRule Uses

type ReplaceRule struct {
    From *regexp.Regexp
    To   string
}

A ReplaceRule maps a pattern to its replacement. On the command line, ReplaceRules are provided as strings separated by "->".

type ReplaceRuleList Uses

type ReplaceRuleList []ReplaceRule

A ReplaceRuleList is used to collect multiple replacement rules from the command line.

func (*ReplaceRuleList) Set Uses

func (r *ReplaceRuleList) Set(s string) error

Set adds a replacement rule to the ReplaceRuleList, in the order provided on the command line.

func (*ReplaceRuleList) String Uses

func (r *ReplaceRuleList) String() string

type Strings Uses

type Strings []string

The Strings type can be used to collect multiple command-line options, in the order provided.

func (*Strings) Set Uses

func (s *Strings) Set(val string) error

func (*Strings) String Uses

func (s *Strings) String() string

Package commandline imports 4 packages (graph) and is imported by 2 packages. Updated 2018-10-22. Refresh now. Tools for package owners.