Created
November 15, 2015 16:33
-
-
Save ds0nt/53485ff4060132e505ba to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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])) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[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