package main

import "fmt"

func main() {

	var buf0 []int
	buf1 := []int{}
	buf2 := []int{42}
	buf3 := make([]int, 0)
	buf4 := make([]int, 5)
	buf5 := make([]int, 3, 10)
	fmt.Println(buf0, buf1, buf2, buf3, buf4, buf5)

	someEl := buf2[0]
	fmt.Println(someEl)
	fmt.Printf("Slice info: %#v %v %v\n", buf2, len(buf2), cap(buf2))

	var buf []int
	buf = append(buf, 9, 10)
	buf = append(buf, 12)
	fmt.Printf("Slice info: %#v %v %v\n", buf, len(buf), cap(buf))

	otherBuf := make([]int, 3)
	buf = append(buf, otherBuf...)
	fmt.Printf("Slice info: %#v %v %v\n", buf, len(buf), cap(buf))

	var bufLen, bufCap int = len(buf), cap(buf)
	fmt.Println("Slice info: %v", buf, bufLen, bufCap)



}
