heputils

package
v0.0.0-...-5327f33 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2024 License: AGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ColorBlack  Color = "\u001b[30m"
	ColorRed          = "\u001b[31m"
	ColorGreen        = "\u001b[32m"
	ColorYellow       = "\u001b[33m"
	ColorBlue         = "\u001b[34m"
	ColorReset        = "\u001b[0m"
)

Variables

View Source

Functions

func CheckBoolValue

func CheckBoolValue(val interface{}) bool

import checkFloatValue

func CheckFloatValue

func CheckFloatValue(val interface{}) float64

import checkFloatValue

func CheckIntValue

func CheckIntValue(val interface{}) int

import checkFloatValue

func CheckSQLValue

func CheckSQLValue(val string) string

import checkFloatValue

func Colorize

func Colorize(color Color, message string)

colorize message

func ConvertPayloadTypeToString

func ConvertPayloadTypeToString(val float64) (string, string)

import convertPayloadTypeToString

func ConvertProtoTypeToString

func ConvertProtoTypeToString(val float64) string

import convertProtoTypeToString

func ElementExists

func ElementExists(arr []string, elem string) bool

check if the element exists

func ElementRealExists

func ElementRealExists(arr []string, elem string) bool

check if the element exists

func FileExists

func FileExists(filename string) bool

fileExists checks if a file exists and is not a directory before we try using it to prevent further errors.

func GenCodeChallengeS256

func GenCodeChallengeS256(s string) string

make a genCodeChallengeS256

func GenerateToken

func GenerateToken() string

func Hash32

func Hash32(s string) uint32

make a hash

func IsupToHex

func IsupToHex(s string) string

isup to HEX

func ItemExists

func ItemExists(arr []string, elem string) bool

check if the element exists

func RemoveSqlInjection

func RemoveSqlInjection(val string) string

import checkFloatValue

func Sanitize

func Sanitize(text string) string

func SanitizeIntArray

func SanitizeIntArray(valArray []string) []int

func SanitizeTextArray

func SanitizeTextArray(valArray []string) []string

func YesNo

func YesNo(table string) bool

import YesNo

Types

type CaseInsensitiveReplacer

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

func NewCaseInsensitiveReplacer

func NewCaseInsensitiveReplacer(toReplace, replaceWith string) *CaseInsensitiveReplacer

func (*CaseInsensitiveReplacer) Replace

func (cir *CaseInsensitiveReplacer) Replace(str string) string

type Color

type Color string

Jump to

Keyboard shortcuts

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