When should you use a struct type? For storing the same type of values For adding an additional type of values in runtime For combining different types in a single type to represent a concept CORRECT
阅读全文
go Struct Exercises
Struct Exercises You'll build a queryable command-line game store. Warm Up Load up the data into the game store. List Now, it's time to add an interface to your program using the bufio.Scanner. So the
阅读全文
go questions
What is a pointer? A variable that contains an hexadecimal value A variable that contains a memory address A value that can contain a memory address of a value CORRECT A value that points to a functio
阅读全文
go Pointer Exercises
Pointer Exercises Basics Warm-up and solidify your knowledge of pointers with the basic exercises. This exercise contains 10+ mini exercises in itself. Swap Using funcs, swap the values through pointe
阅读全文
go questions
Which one below is correct? NOTE There are explanations inside the answers. Even if you know the answer please try to select all of them one by one, so you can read the explanations. You can run a lib
阅读全文
go EXERCISE
Check out the exercise and its solution here. EXERCISE Create a new library In it, create a function that returns the Go version Create a command and import your library Call your function that return
阅读全文
go 01-gopath
Where should you save your Go source code? Anywhere on my computer Under $GOPATH Under $GOPATH/src CORRECT What does $GOPATH mean? It's a file for Go runtime Stores Go source code files and compiled p
阅读全文
go 02-code-your-first-program
Which keyword below that you need use to define a package? package main func main() { } func package CORRECT fmt.Println import 1: func keyword is used to declare a new function. 2: That's right! pack
阅读全文
go 03-run-your-first-program
What is the difference between go build and go run? go run just compiles a program; whereas go build both compiles and runs it. go run both compiles and runs a program; whereas go build just compiles
阅读全文
go Cheatsheet: Write your First Go Program
Cheatsheet: Write your First Go Program Hi! For reference, you can store this cheatsheet after you take the lectures in this section. You can also print this cheatsheet and then follow the video lectu
阅读全文