About 37 results
Open links in new tab
  1. Go by Example

    Check out the first example or browse the full list below. Unless stated otherwise, examples here assume the latest major release Go and may use new language features.

  2. Go by Example: Reading Files

    Go by Example: Reading Files Next example: Writing Files.

  3. Go by Example: Hello World

    Go by Example: Hello World Next example: Values.

  4. : Generics - Go by Example

    $ go run generics.go index of zoo: 2 list: [10 13 23]

  5. Go by Example: Select

    Go by Example: Select Next example: Timeouts.

  6. Go by Example: Functions

    Go by Example: Functions Next example: Multiple Return Values.

  7. Go by Example: Recursion

    Go by Example: Recursion Next example: Range over Built-in Types.

  8. Go by Example: Interfaces

    Go by Example: Interfaces Next example: Enums.

  9. : Maps - Go by Example

    : Maps ... Note that maps appear in the form map[k:v k:v] when printed with fmt.Println. $ go run maps.go map: map[k1:7 k2:13] v1: 7 v3: 0 len: 2 map: map[k1:7] map: map[] prs: false map: …

  10. : Arrays - Go by Example

    : Arrays Next example: Slices.