Decimal value for top line Hex String in Go
I am converting the decimal (modified) Hex to the fmt.Sprintf function as I am forming a long string with a for loop. But I want the value to be UpperCase and not LowerCase Hex. Where should this happen? In Dec-Hex conversion? Or string modification. Jooin function?
for ....{
b := []string{}
b = append(b, fmt.Sprintf("[%d=%s]", m.K, fmt.Sprintf("%016x", m.V)[2:14]))}
fmt.Fprintf(
outputFile,
"%d, 0, %d, %s, 0\n",
..,
..,
..,
strings.Join(b, " "))
+3
source to share