The library `strconv` has not a function to convert to uint32
else to uint64 and uint
There is no Atoui32, maybe for some reasons.
Read the replies to your messages form yesterday. You would see:
if bar, err := strconv.Atoui(t[1]); err == nil {
f.bar = uint32(bar)
}
Peter
so what is the solution, I have a variable type is uint32, and now want to convert a string to that variable ?
On Sat, May 22, 2021 at 3:26 PM Mosleh Saeidi <mosleh...@gmail.com> wrote:
>
> so what is the solution, I have a variable type is uint32, and now want to convert a string to that variable ?
To convert a string to an integer see https://golang.org/pkg/strconv/#ParseInt .
Ian