format

package
v0.0.0-...-c859c3e Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2024 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IdentifierFormat

func IdentifierFormat(pubKey []byte, roleType string) string

IdentifierFormat return base format for identifier

func IdentifierUnformat

func IdentifierUnformat(identifier string) (string, string)

IdentifierUnformat return parts of the given identifier

func OperatorID

func OperatorID(operatorPubkey string) string

OperatorID returns sha256 of the given operator public key

Types

type RegexpPool

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

RegexpPool holds a sync.Pool of *regexp.Regexp for a specific pattern

func NewRegexpPool

func NewRegexpPool(pattern string) *RegexpPool

NewRegexpPool creates a new instance of RegexpPool

func (*RegexpPool) Get

func (r *RegexpPool) Get() (*regexp.Regexp, func())

Get returns an instance of the regexp and a callback function that adds it back to the pool

Jump to

Keyboard shortcuts

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