text

package
v0.0.0-...-52a80d5 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2021 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindEmojiIndices

func FindEmojiIndices(runes []rune) []int

FindEmojiIndices will find all parts of a string (rune array) that could potentially be emoji sequences and will return them backwards. they'll be returned backwards in order to allow easily manipulating the data without invalidating the following indexes accidentally. Example:

Hello :world:, what a :nice: day.

would result in

[]int{22,27,6,12}

func GenerateBase32Key

func GenerateBase32Key() (string, error)

GenerateBase32Key generates a 16 character key containing 2-7 and A-Z. The implementation uses crypto/rand.

func GenerateQRCode

func GenerateQRCode(text string, redundancyLevel qr.Level) string

func ParseTFACode

func ParseTFACode(text string) (string, error)

ParseTFACodes takes an arbitrary string and checks whether it's a valid 6 digit number for usage as a tfa code.

Types

This section is empty.

Jump to

Keyboard shortcuts

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