I need to know about how I can infer a number type in Go.
In C++, I can do something like this:
auto number = 0LL
With this, the g++ knows that number is a long long int
variable.
I want to emphasis the number type here! Go uses int
as default type (int
is int32
or int64
depending on machine architecture).
Exists any way that I can define a variable with uint32 or any other number type without declaring explicitly like in the code above? More specifically, using the :=
constructor?
Obs: I don't know how to call this operation in C++ so I don't know how to search about it in Go.