type system 「 Trying to make you to fall in love with Golang 」 1 / 7 Type System Overview Luca Sepe Software Craftsman, Solution Architect, Trainer https://twitter.com/lucasepe/ https://github.com/lucasepe/ https://lucasepe.it/
built-in numeric types: int8 , uint8 ( byte ), int16 , uint16 , int32 ( rune ), uint32 , int64 , uint64 , int , uint , uintptr float32 , float64 complex64 , complex128 「Trying to make you to fall in love with Golang」 - Type System Overview 2 / 7 Type System Overview Luca Sepe Software Craftsman, Solution Architect, Trainer https://twitter.com/lucasepe/ https://github.com/lucasepe/ https://lucasepe.it/
types - fixed-length container types slice type - dynamic-capacity container types map types - associative arrays (or dictionaries) channel types - used to synchronize data among goroutines interface types - key role in reflection and polymorphism 「Trying to make you to fall in love with Golang」 - Type System Overview 3 / 7 Type System Overview Luca Sepe Software Craftsman, Solution Architect, Trainer https://twitter.com/lucasepe/ https://github.com/lucasepe/ https://lucasepe.it/
type keyword. the new defined type and the source type will share the same underlying type their values can be converted to each other types can be defined within function bodies 「Trying to make you to fall in love with Golang」 - Type System Overview 4 / 7 Type System Overview Luca Sepe Software Craftsman, Solution Architect, Trainer https://twitter.com/lucasepe/ https://github.com/lucasepe/ https://lucasepe.it/
a value of the specific type . each type has a zero value that can be viewed as the default value Try It! 「Trying to make you to fall in love with Golang」 - Type System Overview 5 / 7 Type System Overview Luca Sepe Software Craftsman, Solution Architect, Trainer https://twitter.com/lucasepe/ https://github.com/lucasepe/ https://lucasepe.it/
this type it will be set to this zero value Boolean false Integer 0 Floating Point 0 Complex 0 + 0i String "" (empty string) Pointer nil 「Trying to make you to fall in love with Golang」 - Type System Overview 6 / 7 Type System Overview Luca Sepe Software Craftsman, Solution Architect, Trainer https://twitter.com/lucasepe/ https://github.com/lucasepe/ https://lucasepe.it/
(@night) {twitter.com, github.com, linkedin.com} / lucasepe 「Trying to make you to fall in love with Golang」 - Type System Overview 7 / 7 Type System Overview Luca Sepe Software Craftsman, Solution Architect, Trainer https://twitter.com/lucasepe/ https://github.com/lucasepe/ https://lucasepe.it/