I’m new on Go and tried the “hello world” source code on the install page.
package main
import "fmt"
func main() {
fmt.Printf("hello, world\n")
}
```
Wich after compiling the code it results in a 1.5 MB(!) executable (go 1.8/CentOS 7). Nearly the same code in C will only generate a few KB.
What makes this difference? Can I reduce it by including the right libs?
Greetings,
Maik
In short, your Go program includes stuff not included in the C compiled equivalent, and depends less on it’s external environment. This, by the way, is awesome.