Go Programming/Print version

From Wikibooks, open books for an open world
< Go Programming
Jump to: navigation, search



1. Introduction

Overview

Go is an open source, compiled, garbage-collected, concurrent system programming language. It was first designed and developed at Google beginning in September 2007 by Robert Griesemer, Rob Pike, and Ken Thompson.

Go aims to provide the efficiency of a statically typed compiled language with the ease of programming of a dynamic language.

Other goals include:

  • Safety: Type-safe and memory-safe.
  • Intuitive concurrency by providing "goroutines" and channels to communicate between them.
  • Efficient garbage collection "with low enough overhead and no significant latency".[11]
  • High-speed compilation.

Installing and using Go

History


2. Getting Started

Hello World

package main
 
import "fmt"
 
func main() {
    fmt.Println("Hello, World!")
}