common

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: May 1, 2023 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckIfFileExists

func CheckIfFileExists(filepath string) error

func CommonRendering

func CommonRendering(data embed.FS, pathtorender string, i interface{}) (string, error)

func ContainsStringInSlice

func ContainsStringInSlice(s []string, toFind string) bool

func ContainsStringInSliceIgnoreCase

func ContainsStringInSliceIgnoreCase(s []string, toFind string) bool

func CreateDir

func CreateDir(path string) error

func CreatePayloadFile

func CreatePayloadFile(name, ext, source string) (*os.File, error)

TOD: Rework that function

func GetCurrentDate

func GetCurrentDate() string

func GetEnglishWords

func GetEnglishWords() []string

func GetField

func GetField(v interface{}, field string) string

func GetLanguageByteArray added in v0.2.0

func GetLanguageByteArray(data []byte, lang string) string

func GetMD5Hash

func GetMD5Hash(payload []byte) string

func GetSHA1Hash

func GetSHA1Hash(payload []byte) string

func GetSHA256Hash

func GetSHA256Hash(payload []byte) string

func HasField

func HasField(v interface{}, name string) bool

func RandomInt

func RandomInt(start, end int) int

func RandomString

func RandomString(n int) string

func RandomStringOnlyChar

func RandomStringOnlyChar(n int) string

func RemoveExt

func RemoveExt(filename string) string

func SetDebug

func SetDebug(source interface{}, fieldName string, debugValue bool)

func SetField

func SetField(source interface{}, fieldName string, fieldValue string)

https://stackoverflow.com/questions/44255344/using-reflection-setstring/44255582

Types

This section is empty.

Jump to

Keyboard shortcuts

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