From 6e51f801fbb5e60b48f7fa58f202f171ceb8dc1d Mon Sep 17 00:00:00 2001 From: Amir Hossein <77993374+Kamandlou@users.noreply.github.com> Date: Fri, 16 Sep 2022 14:21:40 +0430 Subject: [PATCH] update code comment for helping IDEs (#2095) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix unhandled errors * fix unhandled error in cache package test * omit variable type * omit variable type * rename variable because collide with the imported package name * handle file error on closing * fix unhandled in common_linux.go * fix unhandled errors in helpers_test.go * fix unhandled errors in listen_test.go * remove unused parameter in emptyHandler method * refactor path.go * unhandled error in hooks test * fix unhandled errors in app_test.go * fix unhandled errors in ctx_test.go * ✨ fix unhandled errors in helpers_test.go * revert app_test.go * remove redundant parentheses and update comments * update code comment for helping ide * update code comment for helping ide --- app.go | 6 +++--- color.go | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app.go b/app.go index ee7b468b..033de56c 100644 --- a/app.go +++ b/app.go @@ -570,7 +570,7 @@ func (app *App) handleTrustedProxy(ipAddress string) { } } -// You can use SetTLSHandler to use ClientHelloInfo when using TLS with Listener. +// SetTLSHandler You can use SetTLSHandler to use ClientHelloInfo when using TLS with Listener. func (app *App) SetTLSHandler(tlsHandler *TLSHandler) { // Attach the tlsHandler to the config app.mutex.Lock() @@ -608,7 +608,7 @@ func (app *App) Mount(prefix string, fiber *App) Router { return app } -// Assign name to specific route. +// Name Assign name to specific route. func (app *App) Name(name string) Router { app.mutex.Lock() if strings.HasPrefix(app.latestRoute.path, app.latestGroup.Prefix) { @@ -625,7 +625,7 @@ func (app *App) Name(name string) Router { return app } -// Get route by name +// GetRoute Get route by name func (app *App) GetRoute(name string) Route { for _, routes := range app.stack { for _, route := range routes { diff --git a/color.go b/color.go index 0a47d819..cbccd2eb 100644 --- a/color.go +++ b/color.go @@ -52,7 +52,7 @@ type Colors struct { Reset string } -// Default color codes +// DefaultColors Default color codes var DefaultColors = Colors{ Black: "\u001b[90m", Red: "\u001b[91m",