parser

package
v0.0.0-...-31d7de1 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func String2Hex

func String2Hex(s string) ([]byte, error)

Types

type ByteType

type ByteType int
const (
	ByteKey ByteType = iota
	BytePrefix
	ByteAll
)

type Result

type Result struct {
	// contains filtered or unexported fields
}

Result represents simple regex result

Current support type: "prefix" inlcude only one key "prefix{keylen}" include all keys start with prefix and key with keylen "prefix*" include all keys start with prefix

func ParseKeys

func ParseKeys(ctx *cli.Context) (*Result, error)

func (*Result) Key

func (r *Result) Key() []byte

func (*Result) KeyLen

func (r *Result) KeyLen() int

KeyLen returns key length without prefix

func (*Result) ShouldSkip

func (r *Result) ShouldSkip(k []byte) bool

func (*Result) Type

func (r *Result) Type() ByteType

Jump to

Keyboard shortcuts

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