escape

package
v1.6.1-exp-tr Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2018 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package escape contains utilities for escaping parts of InfluxQL and InfluxDB line protocol.

Index

Constants

This section is empty.

Variables

View Source
var Codes = map[byte][]byte{
	',': []byte(`\,`),
	'"': []byte(`\"`),
	' ': []byte(`\ `),
	'=': []byte(`\=`),
}

Codes is a map of bytes to be escaped.

Functions

func AppendUnescaped added in v1.1.0

func AppendUnescaped(dst, src []byte) []byte

AppendUnescaped appends the unescaped version of src to dst and returns the resulting slice.

func Bytes

func Bytes(in []byte) []byte

Bytes escapes characters on the input slice, as defined by Codes.

func IsEscaped added in v1.1.0

func IsEscaped(b []byte) bool

IsEscaped returns whether b has any escaped characters, i.e. whether b seems to have been processed by Bytes.

func String

func String(in string) string

String returns the escaped version of in.

func Unescape

func Unescape(in []byte) []byte

Unescape returns a new slice containing the unescaped version of in.

func UnescapeString

func UnescapeString(in string) string

UnescapeString returns unescaped version of in.

Types

This section is empty.

Jump to

Keyboard shortcuts

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