GoLang Flashcards

1
Q

declare and assign variables
declare constants
specifying the type

A
conferenceName := "Go Conference"
const conferenceTickets = 50
var remaningTickets uint = 50
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

pointes in go

A

Pointes are special variables that point to a location in memory
They can be accessed by using an &

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly