Functions used in everyday life that help a lot.
go get go.mongodb.org/mongo-driver@v1.1.0
$ go get github.com/armando-couto/goutils
ListFolderFiles(path string) Return []os.FileInfo
ReadingFiles(path string, fileName string) Return string
RemoveFilesOfPath(path string) Return void
ReturnsTheRows(text string) Return []string
CreateDirectory(directory string) Return bool
CreateArchiveNodirectory(nomeDoArquivo string, conteudo string) Return error
IsError(err error) Return bool
Backup(path, name, texto string) Return void
ContainsToStringInArray(a []string, x string) Return int
ConectionSQS() Return *sqs.SQS
TokenGeneratorMessageId() Return string
EncodeStringToBase64(value string) Return string
DecodeBase64ToString(value string) Return string
ContainsToStringInArrayReturnBool(a []string, x string) Return bool
ValidationCPF(cpf string) Return error
ValidationCNPJ(cnpj string) Return error
CSVGZExport(StructCsv [][]string, nomeArquivo string) Return error
CSVRead(pathFile string) Return [][]string
GeneratorFilesGen(payload []interface{}, f func ([][]string) [][]string, nomeArq string) Return error
ConvertStringToTimeLayoutDDMMYYYY(value string) Return time.Time
ConvertTimeToStringLayoutDD_MM_YYYY(date time.Time) Return string
ConvertStringToTimeLayoutDD_MM_YYYY(value string) Return time.Time
ConvertStringToTimeLayoutDD_MM_YYYY_HH_MM_SS(value string) Return time.Time
ConvertStringDD_MM_YYYY(date string) Return time.Time
ConverTimeToStrinLayoutYYYY_MM_DD(data time.Time) Return string
ConvertStringToTimeLayoutYYYYMMDD(value string) Return time.Time
ConvertStringToTimeLayoutYYYY_MM_DD(value string) Return time.Time
ConverTimeToStrinLayoutYYYYMMDD(data time.Time) Return string
ConvertStringToTimeLayoutYYMMDDHHMMSS(value string) Return time.Time
ConvertStringToTimeLayoutYYYYMMDDHHMMSS(value string) Return time.Time
ConvertStringToTimeLayout_YYYY_MM_DD_HH_MM_SS(date time.Time) Return string
ConvertStringToTimeLayout_YYYY_MM_DD(date time.Time) Return string
ConvertStringToTimeLayoutYYYY_MM_DDTHH_MM_SS_000Z(value string) Return time.Time
ConvertStringToTimeLayoutYYYY_MM_DDTHH_MM_SS_000(value string) Return time.Time
ConvertStringToTimeLayoutHHMMSS(value string) Return time.Time
ConvertStringToTimeLayoutHH_MM_SS(value string) Return time.Time
ConvertStringToTimeLayoutDDMMYYYYHHMMSS(d time.Time, h time.Time) Return time.Time
RangeDate(end, start time.Time) func () Return time.Time
DatePlusTime(date, timeOfDay time.Time) Returns (time.Time, error)
WeekStartDate(date time.Time) time.Time
WeekEndDate(date time.Time) time.Time
Godotenv(key string) Return string
Subtract(valo1, valor2 float64) Return float64
ConvertFloatToFloatScale2(valor float64) Return float64
ConvertFloat64ToString(value float64) Return string
ConvertFloat64ToString4Decimal(value string) Return float64
ConvertStringToFloat64(value string) Return float64
ConvertStringToFloatScale2Comma(value string) Return float64
ConvertStringToFloatScale2FormatNumber(value string) Return float64
ConvertStringToFloatScale2(value string) Return float64
ConvertFloatToBrMoneyString(value float64) Return string
ListOfAvailableFilesNoFTP(remote string, port string, user string, pass string) Returns (*ftp.ServerConn, error, []string)
GetHostKey(host string, isProduction bool) Return ssh.PublicKey
ContainsInt(a []int, x int) Return bool
ConvertStringToInt5Digits(value string) Return int
ConvertStringToInt(value string) Return int
ConvertIntToString(value int) Return string
CreateFileDay(message interface{}) Return void
ConnectionBDMySQL() Return *sql.DB
ConnectionBDPostgreSQL() Return *sql.DB
ConnectionBDPostgreSQLORM() Return (DB *gorm.DB)
RemoveZerosInLeft(value string) Return string
RemoveSpaceString(value string) Return string
RemoveCharacters(value string) Return string
StandardizesMasksByCard(numeroCartao string) Return string
StringTrim(value string) Return string
RemoveSpecialCharacters(value string) Return string
RandSeq(n int) Return string
TokenGeneratorNLength(length int) Return string
TokenGeneratorOrderReferenceId() Return string
RemoveHeadHyphen(s string) Return string
ValidateIfNotEmptyNumber(valor string) Return string
ValidateIfNotEmptyDate(data string) Return string
RemoveCNPJMask(cnpj string) Return string
ParseBinToHex(s string) Return string
CheckIfIdIfNotZero(objetoId int) Return interface{}
Throw(up Exception) Return void
(tcf Block) Do() Return void
MaskCard6Initials(cardString string) Return string
MaskLastDigits(card string) Return string
MaskCard(cardString string) Return string
ExpiryDate(valor string) Returns (string, string)
ValidateTelephone(telefone string) Return string
ZipFiles(filename string, files []string) Return error
AddFileToZip(zipWriter *zip.Writer, filename string) Return error