go test sample study
package main import "fmt" func plus(a, b int, name string) (int, string) { return a + b, name } func main() { result, name := plus(2, 2, "gunwoo") fmt.Println(result, name) } package main import "fmt" func plus(a ... int) (int) { var total int // == total := 0 for _, item := range a { total += item } return total //_ => 무시 //index = int //item => main, 2, 3, 4, 5,6,7 //range는 반복가능한 것들을 반복하게 해준다 ..
2022. 7. 21.