GoLang Flashcards
1
Q
declare and assign variables
declare constants
specifying the type
A
conferenceName := "Go Conference" const conferenceTickets = 50 var remaningTickets uint = 50
2
Q
pointes in go
A
Pointes are special variables that point to a location in memory
They can be accessed by using an &
3
Q
export a function from a package
A
in go, we export functions by making the first letter of their name capital
That’s why the first letter of all the functions from packages such as fmt are capital
4
Q
Wait Groups
A
Prevents the main thread from exiting the program when it’s done and forces it to wait for the specified goroutines to finish.
5
Q
goroutine
A
This is how go handles concurrency
It spins up a green thread, which is an abstraction of a operation system thread