rfc8259exponentnumber

package
v0.0.0-...-e93dbfa Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Parse

func Parse(runescanner io.RuneScanner, dst *ExponentNumber) error

Parse tries to parse the JSON exponent-number literal. If it succeeds, then it return nil. If it failed, it returns an error.

IETF RFC-8259 calls a exponent number an "int" with this definition:

e = %x65 / %x45            ; e E

exp = e [ minus / plus ] 1*DIGIT

minus = %x2D               ; -

plus = %x2B                ; +

Example usage:

var runescanner io.RuneScanner

// ...

var dst rfc8259exponentnumber.ExponentNumber
err := rfc8259exponentnumber.Parse(runescanner, &dst)

if nil != err {
	return err
}

fmt.Printf("dst = %#v\n", dst)

Types

type ExponentNumber

type ExponentNumber struct {
	opt.Optional[string]
}

ExponentNumber:

From IETF RFC-8259 ExponentNumber represents the following:

e = %x65 / %x45            ; e E

exp = e [ minus / plus ] 1*DIGIT

minus = %x2D               ; -

plus = %x2B                ; +

func Nothing

func Nothing() ExponentNumber

func Something

func Something(value string) ExponentNumber

func (ExponentNumber) GoString

func (receiver ExponentNumber) GoString() string

Jump to

Keyboard shortcuts

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