1. 1
  1.  

  2. 1

    In Go, only pointer and interface types can have a value of nil, which they will have if they’re uninitialized.

    Slice and map types can also be nil. If you do var foo map[T]T then foo will be a nil map by default. If you do var foo []T then foo will be a nil slice by default.

    They both happen to act the same as empty maps/slices when given to len() etc.