package main
import "fmt"
func testSliceParams(strs []string, msg string) {
fmt.Printf("WangAo test: strs----2: %d %d %p %v\n", len(strs), cap(strs), &strs, strs)
tmp := strs[0]
strs[0] = msg
fmt.Printf("WangAo test: strs----3: %d %d %p %v\n", len(strs), cap(strs), &strs, strs)
strs = append(strs, msg)
fmt.Printf("WangAo test: strs----4: %d %d %p %v\n", len(strs), cap(strs), &strs, strs)
strs[0] = tmp
fmt.Printf("WangAo test: strs----5: %d %d %p %v\n", len(strs), cap(strs), &strs, strs)
strs = append(strs, msg)
fmt.Printf("WangAo test: strs----6: %d %d %p %v\n", len(strs), cap(strs), &strs, strs)
strs = append(strs, msg)
fmt.Printf("WangAo test: strs----7: %d %d %p %v\n", len(strs), cap(strs), &strs, strs)
strs = append(strs, msg)
fmt.Printf("WangAo test: strs----8: %d %d %p %v\n", len(strs), cap(strs), &strs, strs)
strs = append(strs, msg)
fmt.Printf("WangAo test: strs----9: %d %d %p %v\n", len(strs), cap(strs), &strs, strs)
tmp = strs[0]
strs[0] = msg
fmt.Printf("WangAo test: strs---10: %d %d %p %v\n", len(strs), cap(strs), &strs, strs)
}
func main() {
strs := make([]string, 0, 3)
strs = append(strs, "test1")
fmt.Printf("WangAo test: strs----1: %d %d %p %v\n", len(strs), cap(strs), &strs, strs)
testSliceParams(strs, "test2")
fmt.Printf("WangAo test: strs---11: %d %d %p %v\n", len(strs), cap(strs), &strs, strs)
}