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.

Revisions

  1. ds0nt created this gist Nov 15, 2015.
    16 changes: 16 additions & 0 deletions main.go
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,16 @@
    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]))
    }
    5 changes: 5 additions & 0 deletions output
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,5 @@
    [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