Go to file
2024-11-23 12:43:10 +01:00
app remove handlers package and duplicate keys 2024-11-23 12:43:10 +01:00
db simplified gopher-toolbox 2024-11-22 10:44:21 +01:00
esfaker add sentence generation function and create README.md 2024-11-23 11:10:48 +01:00
excel2struct adding excel2struct 2024-10-17 20:59:36 +02:00
pgutils feat: added more utilities functions 2024-11-03 20:57:03 +01:00
utils simplified gopher-toolbox 2024-11-22 10:44:21 +01:00
.env.example rework new app 2024-11-22 12:52:53 +01:00
.gitignore add esfaker 2024-10-17 21:01:45 +02:00
go.mod rework new app 2024-11-22 12:52:53 +01:00
go.sum rework new app 2024-11-22 12:52:53 +01:00
README.md add sentence generation function and create README.md 2024-11-23 11:10:48 +01:00

Gopher Toolbox

Es una librería donde se concentra el código boilerplate que se usan en distintos proyectos. Incluyen lo siguiente:

  • Implementación controladores de bases de datos:

  • Utilidades para conversión de tipos pgtype a tipos de Golang.

  • Generación de datos aleatorios para pruebas unitarias, similar a librería Faker de Python.

MaleName() string
FemaleName() string
Name() string
LastName() string
Email(beforeAt string) string
Int(min, max int64) int64
Float(min, max float64) float64
Bool() bool
Chars(min, max int) string
AllChars(min, max int) string
AllCharsOrEmpty(min, max int) string
AllCharsOrNil(min, max int) *string
NumericString(length int) string
Sentence(min, max int) string
  • Conversión de ficheros Excel a tipos estructurados. Se le pasa el tipo del struct a la función Convert[T any](bookPath, sheetName string) y te devolverá los datos del tipo dataExcel []T.

  • Constantes para los manejadores HTTP.

  • Utilidades varias

CorrectTimezone(timeStamp time.Time) time.Time 
GetBool(value string) bool
LogAndReturnError(err error, message string) error
GetBoolFromString(s string) bool
Slugify(s string) string