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(): https://golang.org/pkg/fmt/#Sprintf

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

Sure, Sprintf returns a string. Eg: https://play.golang.org/p/IhiSWZUUNmy

1 Like

NIIIICE THANK you <3

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