parser

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BoolParser

type BoolParser struct{}

BoolParser 布尔解析器

func NewBoolParser

func NewBoolParser() *BoolParser

NewBoolParser 构造布尔解析器

func (*BoolParser) GetData

func (parser *BoolParser) GetData(v any, target reflect.Kind) (any, error)

GetData 实现 IParser 接口

type IParser

type IParser interface {
	GetData(v any, target reflect.Kind) (any, error)
}

IParser 解析器接口

func GetParser

func GetParser(name string) IParser

GetParser 获取指定解析器

type NumberParser

type NumberParser struct{}

NumberParser 数字解析器

func NewNumberParser

func NewNumberParser() *NumberParser

NewNumberParser 构造数字解析器

func (*NumberParser) GetData

func (parser *NumberParser) GetData(v any, target reflect.Kind) (any, error)

GetData 实现 IParser 接口

type StringParser

type StringParser struct{}

StringParser 字符串解析器

func NewStringParser

func NewStringParser() *StringParser

NewStringParser 构造字符串解析器

func (*StringParser) GetData

func (parser *StringParser) GetData(v any, target reflect.Kind) (any, error)

GetData 实现 IParser 接口

Jump to

Keyboard shortcuts

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