common

package
v0.0.0-...-8f6310f Latest Latest
Warning

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

Go to latest
Published: Jan 13, 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 GetDebugFunction

func GetDebugFunction() string

func GetDebugImports

func GetDebugImports() []string

Reserve to Debug

func GetEnglishWords

func GetEnglishWords() []string

func GetExportNames

func GetExportNames(extension string) string

func GetField

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

func GetGolangByteArray

func GetGolangByteArray(data []byte) string

func GetMD5Hash

func GetMD5Hash(payload []byte) string

func GetProperGolangArch

func GetProperGolangArch(arch string) (string, error)

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