Thanks to visit codestin.com
Credit goes to Github.com

Skip to content

nooize/go-assist

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

54 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-assists

Series of helpers and structs for golang

Work with Structs


Map2Struct(m map[string]interface{}, s interface{}) error
Struct2Map(s interface{}) map[string]interface{}

Work with Strings


CamelToSnakeCase(str string) string

Convert a camel case string to snake case

Example: java_script -> JavaScript

IsStringUrl(v string) bool
RandomString(length int) string
RandomNumberString(length int) string

Work wit time.Time


IsTimeZero(t *time.Time)

Check if time is equals to 00:00:00

StartOfTheDay(t *time.Time) *time.Time

Return new time.Time with time equals to start of the day : 00:00:00

EndOfTheDay(t *time.Time) *time.Time

Return new time.Time with time equals end of the day : to 23:59:59

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages