tr

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(args []string) error

Types

type Config

type Config struct {
	Delete    bool `flag:"" desc:"Delete characters in set1"`
	Squeeze   bool `flag:"" desc:"Squeeze repeated characters"`
	Translate bool `flag:"" desc:"Translate characters"`
	Set1      string
	Set2      string
	XML       bool
	JSON      bool
	Plain     bool
	Pretty    bool
}

type TrError

type TrError struct {
	XMLName xml.Name `xml:"error"`
	Code    int      `xml:"code,attr"`
	Msg     string   `xml:"msg,attr"`
}

type TrResult

type TrResult struct {
	XMLName   xml.Name  `xml:"tr"`
	Timestamp int64     `xml:"timestamp,attr"`
	Set1      string    `xml:"set1,attr"`
	Set2      string    `xml:"set2,attr"`
	LinesIn   int       `xml:"lines_in,attr"`
	LinesOut  int       `xml:"lines_out,attr"`
	Content   string    `xml:"content,omitempty"`
	Errors    []TrError `xml:"error,omitempty"`
}

Jump to

Keyboard shortcuts

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