Update willSkipLog's comment

This commit is contained in:
liasica 2021-10-12 15:43:36 +08:00 committed by GitHub
parent 38bd93dfb9
commit 7a541e3822
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -274,7 +274,7 @@ func LoggerWithConfig(conf LoggerConfig) HandlerFunc {
} }
} }
// willSkipLog if skip path is "attachments/", url like "attachments/producthunt/*" will be skipped // willSkipLog if skip path is "/attachments/", url like "/attachments/producthunt/*" will be skipped
func willSkipLog(path string, skip map[string]struct{}) bool { func willSkipLog(path string, skip map[string]struct{}) bool {
for p := range skip { for p := range skip {
if strings.HasPrefix(path, p[:len(p)-1]) { if strings.HasPrefix(path, p[:len(p)-1]) {