update code comment for helping IDEs (#2095)

* 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
pull/2099/head
Amir Hossein 2022-09-16 14:21:40 +04:30 committed by GitHub
parent 709c52301c
commit 6e51f801fb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

6
app.go
View File

@ -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) { func (app *App) SetTLSHandler(tlsHandler *TLSHandler) {
// Attach the tlsHandler to the config // Attach the tlsHandler to the config
app.mutex.Lock() app.mutex.Lock()
@ -608,7 +608,7 @@ func (app *App) Mount(prefix string, fiber *App) Router {
return app return app
} }
// Assign name to specific route. // Name Assign name to specific route.
func (app *App) Name(name string) Router { func (app *App) Name(name string) Router {
app.mutex.Lock() app.mutex.Lock()
if strings.HasPrefix(app.latestRoute.path, app.latestGroup.Prefix) { if strings.HasPrefix(app.latestRoute.path, app.latestGroup.Prefix) {
@ -625,7 +625,7 @@ func (app *App) Name(name string) Router {
return app return app
} }
// Get route by name // GetRoute Get route by name
func (app *App) GetRoute(name string) Route { func (app *App) GetRoute(name string) Route {
for _, routes := range app.stack { for _, routes := range app.stack {
for _, route := range routes { for _, route := range routes {

View File

@ -52,7 +52,7 @@ type Colors struct {
Reset string Reset string
} }
// Default color codes // DefaultColors Default color codes
var DefaultColors = Colors{ var DefaultColors = Colors{
Black: "\u001b[90m", Black: "\u001b[90m",
Red: "\u001b[91m", Red: "\u001b[91m",