デフォルトではミドルウェアなし

以下を使用してください

r := gin.New()

下記の代わりに

// Default With the Logger and Recovery middleware already attached
r := gin.Default()