Excessive nil pointer checks in Go

46 points by eduard


dlowe

I am pleading once again to all you other Go programmers to wrap your errors.

redisClient, err := NewRedisClient(addr)
if err != nil {
	return nil, fmt.Errorf("Couldn't obtain new RedisClient: %w", err)
}

Context about the error should be accumulated as the call stack unravels.