amount is a simple go package that converts financial amount to words. Catering to indian style i.e lakh and crore instead of millions or billions.
go get github.com/jethi/amount
Simply use the ToWords function after installing and importing.
import "github.com/jethi/amount"
ToWords accept a uint and returns corresponding amount in words.
amount.ToWords(uint) string
package main
import (
"fmt"
"github.com/jethi/amount"
)
func main() {
var myNum uint
var ans string
myNum = 561085
ans = amount.ToWords(myNum)
fmt.Println(ans)
}
Five Lakh Sixty One Thousand Eighty Five