How to recive value from printf

for example fmt.Printf("%x", …) returns string representation of hex, and i want to equate a variable to this string

I think you are looking for fmt.Sprintf():

yeah, but can i assign result of Sprintf to a variable?

Sure, Sprintf returns a string. Eg:

1 Like


This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.