How to install Go in Ubuntu
URL - Guide
Lets Run Fundamental Code in Go
https://www.devopsschool.com/tutorials/go-tutorials-foundation-level/
** Advance Go Array - Slice - Map - Struct **
https://www.devopsschool.com/tutorials/go-tutorials-arrays-slices-maps-and-structs/
Go Tutorials: Arrays, Slices, Maps, and Structs
https://www.devopsschool.com/tutorials/go-tutorials-arrays-slices-maps-and-structs/
Go Tutorial: Go Functions and Methods
https://www.devopsschool.com/tutorials/go-tutorial-go-functions-and-methods/
Go Tutorial: Go Interfaces
https://www.devopsschool.com/tutorials/go-tutorial-go-interfaces/
Go concurrency
https://www.devopsschool.com/tutorials/go-tutorials-go-concurrency-beginner-tutorial/
Top comments (3)
float32 only has about 6–7 decimal digits of precision.
Your number:
234234234.5324234234
has far more precision than float32 can store.
Therefore Go will store an approximation, likely something around:
234234240
or display it in scientific notation such as:
2.3423424e+08
This is not a pointer problem. It is a float32 precision limitation.
package main
import "fmt"
func main() {
// Start empty, with room for three strings before growth is needed.
names := make([]string, 0, 3)
}
O/P: > go run hello.go
names: [Asha Ben Chen sru]
length: 4
capacity: 6
first two: [Asha Ben]
what is the logic behind the capacity here?