Skip to content

Instantly share code, notes, and snippets.

@ds0nt
Created November 15, 2015 16:33
Show Gist options
  • Save ds0nt/53485ff4060132e505ba to your computer and use it in GitHub Desktop.
Save ds0nt/53485ff4060132e505ba to your computer and use it in GitHub Desktop.
package main
import (
"fmt"
)
func main() {
s := [][]string{
{"a", "b", "c"},
{"d", "e", "f"},
}
fmt.Printf("s: %v\n", s)
fmt.Printf("len(s): %v\n", len(s))
fmt.Printf("s[0]: %v\n", s[0])
fmt.Printf("len(s[0]): %v\n", len(s[0]))
}
[dsont@dsont-pc forky]$ go run main.go
s: [[a b c] [d e f]]
len(s): 2
s[0]: [a b c]
len(s[0]): 3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment