From 27570bae67926be3a183eded55933aee0d475557 Mon Sep 17 00:00:00 2001 From: Steven Penny Date: Thu, 16 Apr 2015 22:35:48 -0500 Subject: [PATCH] new file: go/README.md modified: go/go-cyg.go --- go/README.md | 33 +++++++++++++++++++++++++++++++++ go/go-cyg.go | 1 + 2 files changed, 34 insertions(+) create mode 100644 go/README.md diff --git a/go/README.md b/go/README.md new file mode 100644 index 0000000..8774a17 --- /dev/null +++ b/go/README.md @@ -0,0 +1,33 @@ +# Why Go? + +Consider this Python script + +~~~py +print("Hello world") +~~~ + +You can compile it for Windows like this + + build_exe --bundle-files 0 --compress --optimize hello.py + upx -9 hello.exe + +and it comes out to 4.16 MB. Now consider this Go script + +~~~go +package main +import "fmt" +func main() { + fmt.Println("Hello world") +} +~~~ + +You can compile it like this + + go build -ldflags -s hello.go + upx -9 hello.exe + +and it comes out to 375 KB. Something else to consider is that Python is built +with Visual C++ 2010. That means that the program you create will not work on +Windows 7 for example unless the user has installed Visual C++ 2010. Go is built +with Visual C++ 6, this means that any programs created with Go will work on +Windows 7 as is. diff --git a/go/go-cyg.go b/go/go-cyg.go index 97b717f..11ef2b2 100644 --- a/go/go-cyg.go +++ b/go/go-cyg.go @@ -54,4 +54,5 @@ func foxtrot() { func main() { foxtrot() // parse ini + // category: Base }