diff --git a/array/append.go~ b/array/append.go~ deleted file mode 100644 index b213107..0000000 --- a/array/append.go~ +++ /dev/null @@ -1,24 +0,0 @@ -package main - -import "fmt" - -func main() { - ary := []int{} - for i := 0; i < 10; i++ { - ary = append(ary, i) - fmt.Printf("%d: %p cap:%d %v\n", i, ary, cap(ary), ary) - } - /* - 0: 0x14000134008 cap:1 [0] - 1: 0x14000134030 cap:2 [0 1] - 2: 0x1400013a020 cap:4 [0 1 2] - 3: 0x1400013a020 cap:4 [0 1 2 3] - 4: 0x1400012c080 cap:8 [0 1 2 3 4] - 5: 0x1400012c080 cap:8 [0 1 2 3 4 5] - 6: 0x1400012c080 cap:8 [0 1 2 3 4 5 6] - 7: 0x1400012c080 cap:8 [0 1 2 3 4 5 6 7] - 8: 0x1400013c000 cap:16 [0 1 2 3 4 5 6 7 8] - 9: 0x1400013c000 cap:16 [0 1 2 3 4 5 6 7 8 9] - */ -} -