CATEGORY

GOLANG Solutions

[SOLVED] Define GO function with multiple types

We can either use an empty interface using interface{} or use generics to define golang function accept two types or multiple types as an input.

By tuannguyen · 4 min read · GOLANG Solutions

SOLVED: How to reverse sort slice of integer in GO

There are two methods to sort slice of integer in reverse or descending order. To sort in descending order, you have to implement the sort.Interface interface …

By tuannguyen · 3 min read · GOLANG Solutions

SOLVED: Golang access variable from another package

golang access variable from another package, golang global variable, golang global variables across files, golang export variable from package, golang not …

By admin · 4 min read · GOLANG Solutions

Solved: Call function from another package in GO

golang call function from another directory, call function from same package golang, golang call function from another package, how to call another function in …

By admin · 5 min read · GOLANG Solutions