How to find the Length of Channel, Pointer, Slice, String and Map in Golang?
Channel: In Go language, a channel is a medium through which a goroutine communicates with another goroutine and this communication is lock-free.
Channel: 0 Channel: 3
Pointer: Pointers in Go programming language or Golang is a variable which is used to store the memory address of another variable.
Slice: Slice is a variable-length sequence which stores elements of a similar type, you are not allowed to store different type of elements in the same slice.
String: It is a sequence of variable-width characters where each and every character is represented by one or more bytes using UTF-8 Encoding.
Map: Golang Maps is a collection of unordered pairs of key-value.