Sunday, February 7, 2016

Testing Gist & Go Playground

The Gist:


package main
import "fmt"
func showArgs(args ...int) {
fmt.Println(args)
}
func main() {
//n := []byte{0, 1, 2, 3, 4} //odd
n := []byte{0, 1, 2, 3} //even
l := n[:len(n)/2]
r := n[len(n)/2:]
fmt.Println(n)
fmt.Println(len(n)/2)
fmt.Println(l)
fmt.Println(r)
showArgs(1,2,3)
}

The iframe embed of Go Playground heigh=500

No comments:

Post a Comment