Closed quasilyte closed 5 years ago
Concrete types should go before interfaces they implement, otherwise control will never reach them, since type switch matching is performen sequentially, from first case to the last one.
Found using gocritic "caseOrder" diagnostic.
Signed-off-by: Iskander Sharipov quasilyte@gmail.com
Concrete types should go before interfaces they implement, otherwise control will never reach them, since type switch matching is performen sequentially, from first case to the last one.
Found using gocritic "caseOrder" diagnostic.
Signed-off-by: Iskander Sharipov quasilyte@gmail.com