initial commit

This commit is contained in:
specCon18 2023-12-18 03:40:05 -05:00
commit 493ce92e02
62 changed files with 1213 additions and 0 deletions

BIN
multi-return-values/mrv Executable file

Binary file not shown.

View file

@ -0,0 +1,18 @@
package main
import "fmt"
//the (int,int) in the func sig shows that the func returns 2 ints
func vals()(int,int){
return 3,7
}
func main(){
//here we use the 2 different values from the call with multiple assignment
a,b := vals()
fmt.Println(a)
fmt.Println(b)
//if you only want a subset of the returned values use the blank identifier
_,c := vals()
fmt.Println(c)
}