helpers

package module
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2020 License: MIT Imports: 7 Imported by: 1

README

Go Functions Helper

Installation

go get github.com/Girein/helpers-go

Functions

// ToDateTimeString converts DateTime into string with Y-m-d H:i:s format
func ToDateTimeString(dateTime time.Time) string {}

// GormOpen returns database connection
func GormOpen(driver string) *gorm.DB {}

// LogIfError logs the error with message
func LogIfError(err error, message string) {}

// RandomString generates random string with custom length
func RandomString(length int) string {}

// RandomInteger returns random integer between parameters
func RandomInteger(min int, max int) int {}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GormOpen added in v1.0.1

func GormOpen(driver string) *gorm.DB

GormOpen returns database connection

func LogIfError added in v1.0.4

func LogIfError(err error, message string)

LogIfError logs the error with message

func RandomInteger added in v1.0.4

func RandomInteger(min int, max int) int

RandomInteger returns random integer between parameters

func RandomString added in v1.0.4

func RandomString(length int) string

RandomString generates random string with custom length

func ToDateTimeString

func ToDateTimeString(dateTime time.Time) string

ToDateTimeString converts DateTime into string with Y-m-d H:i:s format

Types

This section is empty.

Jump to

Keyboard shortcuts

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