func toHex(decimal_val int) {
	var quotient, remainder int
	var j int = 0
	var hex [10]int
	quotient = decimal_val
	for quotient != 0 {
		remainder = quotient % 16
		if remainder < 10 {
			j += 1
			hex[j] = 48 + remainder
		} else {
			hex[j] = 55 + remainder
			quotient /= 16
		}
	}
	fmt.Println("the hexadecimal equivalent is", hex[j])
}
to convert into toDecimal function
package main
import "fmt"