tags:
- ready
- online
- reviewed
- go
- summary
- informatic
- types
type-inference
Contents
__Roadmap info from [ roadmap website ] (https://roadmap.sh/golang/go-basics/type-inference) __
Type Inference
Type inference gives go the capability to detect the type of a value without being explicitly indicated , hence the possibility to declare variables without providing its type at first
Visit the following resources to learn more:
-
:=syntax to declare a variable and let the compiler infer its type from the assigned value. -
fmt.Printf("x is of type %T\n", x)%Treturns the type of the function.