mirror of
https://github.com/chai2010/advanced-go-programming-book.git
synced 2025-05-24 12:32:21 +00:00
14 lines
147 B
Go
14 lines
147 B
Go
package main
|
|
|
|
import (
|
|
"fmt"
|
|
)
|
|
|
|
func main() {
|
|
nums := make([]int, 5)
|
|
for i := 0; i < len(nums); i++ {
|
|
nums[i] = i * i
|
|
}
|
|
fmt.Println(nums)
|
|
}
|