Skip to main content

Posts

Showing posts from January, 2019

Say Hello World with Golang

We will start with the traditional "Hello World" program which will appear in 1978 in the C programming language. C language influenced directly on Go. package main import "fmt" func main() { fmt.Println("Hello, 世界") } We assume that you have programmed in one or more languages whether compiled like c, c++, java or interpreted python, ruby, javascript. Go is compiled language. The Go toolchain converts source code. These toolchain accessed by a single command called  go  and multiple subcommands (run, build). $ go run hello_world.go prints - Hello World, 世界 Go handles Unicode. so it can process text in all languages. If the program is more than a one-shot experiment means we run a file any time without processing used build subcommand. $ go build hello_world.go This creates an executable binary file called hello. that file can run anywhere without further processing  $ ./hello_world Hello World, 世界 Let's ...