Skip to content

A repository for showcasing my knowledge of the Google Go (2009) programming language, and continuing to learn the language.

License

GPL-3.0 and 3 other licenses found

Licenses found

GPL-3.0
LICENSE.txt
GPL-3.0
LICENSE.go
GPL-3.0
LICENSE-GPL.txt
GPL-3.0
LICENSE-GPL3.txt
Notifications You must be signed in to change notification settings

seanpm2001/Learn-GoogleGo


/Go_Logo_Blue.svg

Learning Google Golang (programming language)

Not to be confused with the Go! programming language by Francis McCabe

I don't know very much about the Google Go programming language, and it is a language I intend to not learn much about. This document will go over my knowledge of the Go programming language.

Hello World in Google Go

This is an example of a hello world program in the Google Go programming language.

package main

import "fmt" // Import Formatting settings

func main()
{ // This is the way I associate curly bracket usage in Go, as I see examples written like this, with the curly bracket wasting an extra line
    fmt.Println("Hello, world!")
}

Comments in Google Go

Comments in Go are identical to comments in C, JavaScript, CSS, C#, C++, etc..

// This is a single line comment
/* This is a
multi-line comment */
/* This is 
* also a
* Multi-line
* comment */

Break keyword in Google Go

break;

To this day, I am still not entirely sure what the break keyword does, but most languages support it.

/!\ This example has not been tested yet, and may not work

Other knowledge of the Google Go programming language

  1. Go was created in 2009 by Google

  2. Google steamrolled over the Go! programming language

  3. Google Go is created by Google

  4. Go is a semicolon and curly bracket language

  5. Go is meant to be a minimal recreation of the C programming language

  6. Google Go uses the .go file extension

  7. Google uses a Gopher as a mascot for the Go programming language.

  8. No other knowledge of the Google go programming language