Skip to content

andrelrg/gutils

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gutils

Util functions in Go.

In this lib you'll find some cool functions to help your code get more readable and even better. All available functions have intuitive names so you can easily understand what it does and returns.

Available functions so far:

  • ReadConfigJson: reads a setting file (usually we use a json file, so it's easy to understand) and fill a struct with the data from the file. Make sure to send a struct with the correct field names so you don't miss any data due to a name mismatch.

  • RemoveDuplicate: removes duplicate entry in string array.

  • ConvertIntInterfaceToString: tries to convert an interface value to string.

  • ConvertInterfaceToInt64: converts an interface value to int64.

  • InArray: checks if a certain value exists inside the slice/array.

Did you like it? Let's Go code!

You're free to GO.