Go for Beginners — Part 2

If you’re genuinely interested in this you can view all of my progress on my GitHub repo HERE

An Introduction to Go

Photo by Fotis Fotopoulos on Unsplash


go build nameOfFile.go

Running Our Code

go run nameOfFile.go


Importing Packages

Libraries are referred to as Packages within GoLang

When importing Packages make sure to enclose them in double quotes "or else you'll get an error

// main.go
package main
import "fmt"


func nameOfFunction() {
// Write Code Here

Hello World

// main.gopackage mainimport "fmt"func main() {
fmt.Println("Hello World!")

Go uses Dot Syntax to refer to Methods / Functions

$ go run main.go
Hello World!

Importing Multiple Packages

import (
import (
package1Allias "package1"
package2Allias "package2"


// Hello!
package main
// import "fmt" (This line won't be read)




Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store