This series of tutorials helps you solve common problems and errors you may encounter when developing Go applications.
- 1How to cancel a hanging operation in Go
- 2Handling unmarshal JSON with unknown fields in Go
- 3Cannot convert []string to []interface {} in Go
- 4Fixing Go error: cannot use X (type Y) as type Z in assignment
- 5Fixing Go error: nil pointer dereference
- 6Fixing Go error: index out of range
- 7Fixing Go error: panic: runtime error: invalid memory address or nil pointer dereference
- 8Fixing Go error: imported and not used
- 9Fixing Go error: declared and not used
- 10Fixing Go error: type does not implement interface
- 11Fixing Go error: cannot assign to struct field in map
- 12Fixing Go error: fatal error: all goroutines are asleep - deadlock!
- 13Fixing Go error: missing return
- 14Fixing Go error: too many arguments in call to function
- 15Fixing Go error: assignment to entry in nil map
- 16Fixing Go error: invalid argument for len
- 17Fixing Go error: type assertion error
- 18Fixing Go error: invalid operation: mismatched types
- 19Fixing Go error: invalid memory address or nil pointer dereference
- 20Fixing Go error: slice bounds out of range
- 21Fixing Go error: division by zero
- 22Fixing Go error: duplicate key in map literal
- 23Fixing Go error: chan send on closed channel
- 24Fixing Go error: chan receive on closed channel
- 25Fixing Go error: attempt to close closed channel
- 26Fixing Go error: interface conversion: interface is nil, not type
- 27Fixing Go error: undefined: variable or package
- 28Fixing Go error: cannot use untyped nil in assignment
- 29Fixing Go error: no new variables on left side of :=
- 30Fixing Go error: use of untyped nil
- 31Fixing Go error: unexpected newline, expecting comma or }
- 32Fixing Go error: redeclared in this block
- 33Fixing Go error: undeclared name: X
- 34Fixing Go error: syntax error: unexpected X, expecting Y
- 35Fixing Go error: array index must be non-negative integer constant
- 36Fixing Go error: assignment mismatch: X variables but Y values
- 37Fixing Go error: method has pointer receiver, not called with pointer
- 38Fixing Go error: cannot compare X (type Y) with Z (type W)
- 39Fixing Go error: assignment to constant variable
- 40Fixing Go error: attempted to use nil slice
- 41Fixing Go error: copy argument must have slice type
- 42Fixing Go error: method redeclared with different receiver type