parser

package
v0.101.0 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MustParseTime added in v0.21.0

func MustParseTime(lit string) time.Time

MustParseTime parses a time literal and panics in the case of an error.

func ParseDuration added in v0.21.0

func ParseDuration(lit string) ([]ast.Duration, error)

ParseDuration will convert a string into components of the duration.

func ParseRegexp added in v0.21.0

func ParseRegexp(lit string) (*regexp.Regexp, error)

ParseRegexp converts text surrounded by forward slashes into a regular expression.

func ParseString added in v0.21.0

func ParseString(lit string) (string, error)

ParseString removes quotes and unescapes the string literal.

func ParseText added in v0.50.0

func ParseText(lit string) (string, error)

ParseText parses a UTF-8 block of text with escaping rules.

func ParseTime added in v0.21.0

func ParseTime(lit string) (time.Time, error)

ParseTime will parse a time literal from a string.

Types

This section is empty.

Jump to

Keyboard shortcuts

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