Skip to content

This is some example code I wanted to save as part of doing the excercises in the 'A Tour of Go' tutorial

Notifications You must be signed in to change notification settings

RedHoodedWraith/GoLang_Experiments

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GoLang Experiments

By Asami De Almeida

Introduction

This was done as part of my upskilling back when I was at the now defunct Loyalty New Zealand Ltd.

Everything in [go_tour] is code from my exercise attempts from A Tour of Go.

The rest is my own code.

Compiling Go

Follow these instructions for compiling and running a go project.

Random Go Nonsense

This code can be found in the random_go_nonsense directory.
The main package is in nonsense.go.

Running Loopy Thing

Demonstrates Types, Loops and Interfaces in Go.

After compiling the code, run the following arguments with nonsense.go to demonstrate using the loopy_thing package.

./nonsense loopy [number of things you want to make]

For Example: ./nonsense loopy 5

Which will print the following in the terminal:

% ./nonsense loopy 5
Let's Go Loopy!!! Let's make some Things!...

First, let's add some things...
Name: Thing 1 | Number: 1 | Canon?: false
Name: Thing 2 | Number: 2 | Canon?: false
Name: Thing 3 | Number: 3 | Canon?: false
Name: Thing 4 | Number: 4 | Canon?: false
Name: Thing 5 | Number: 5 | Canon?: false

After correcting cannon Things
Name: Thing 1 | Number: 1 | Canon?: true
Name: Thing 2 | Number: 2 | Canon?: true
Name: Thing 3 | Number: 3 | Canon?: false
Name: Thing 4 | Number: 4 | Canon?: false
Name: Thing 5 | Number: 5 | Canon?: false

Vibe Check on all the Things...

Vibe Check: Does Thing 1 pass the Vibe Test?
        Thing 1, You passed the vibe test

Vibe Check: Does Thing 2 pass the Vibe Test?
        Thing 2, You passed the vibe test

Vibe Check: Does Thing 3 pass the Vibe Test?
        Thing 3, You failed the vibe test

Vibe Check: Does Thing 4 pass the Vibe Test?
        Thing 4, You failed the vibe test

Vibe Check: Does Thing 5 pass the Vibe Test?
        Thing 5, You failed the vibe test

About

This is some example code I wanted to save as part of doing the excercises in the 'A Tour of Go' tutorial

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages