Skip to content

Commit 8e425c0

Browse files
committed
gofmt fixes to comments
1 parent 0ae7464 commit 8e425c0

File tree

4 files changed

+13
-13
lines changed

4 files changed

+13
-13
lines changed

bind.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ func (b *DefaultBinder) Bind(i interface{}, c Context) (err error) {
114114
// Only bind query parameters for GET/DELETE/HEAD to avoid unexpected behavior with destination struct binding from body.
115115
// For example a request URL `&id=1&lang=en` with body `{"id":100,"lang":"de"}` would lead to precedence issues.
116116
// The HTTP method check restores pre-v4.1.11 behavior to avoid these problems (see issue #1670)
117-
method := c.Request().Method
117+
method := c.Request().Method
118118
if method == http.MethodGet || method == http.MethodDelete || method == http.MethodHead {
119119
if err = b.BindQueryParams(c, i); err != nil {
120120
return err

binder.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1236,7 +1236,7 @@ func (b *ValueBinder) durations(sourceParam string, values []string, dest *[]tim
12361236
// Example: 1609180603 bind to 2020-12-28T18:36:43.000000000+00:00
12371237
//
12381238
// Note:
1239-
// * time.Time{} (param is empty) and time.Unix(0,0) (param = "0") are not equal
1239+
// - time.Time{} (param is empty) and time.Unix(0,0) (param = "0") are not equal
12401240
func (b *ValueBinder) UnixTime(sourceParam string, dest *time.Time) *ValueBinder {
12411241
return b.unixTime(sourceParam, dest, false, time.Second)
12421242
}
@@ -1247,7 +1247,7 @@ func (b *ValueBinder) UnixTime(sourceParam string, dest *time.Time) *ValueBinder
12471247
// Example: 1609180603 bind to 2020-12-28T18:36:43.000000000+00:00
12481248
//
12491249
// Note:
1250-
// * time.Time{} (param is empty) and time.Unix(0,0) (param = "0") are not equal
1250+
// - time.Time{} (param is empty) and time.Unix(0,0) (param = "0") are not equal
12511251
func (b *ValueBinder) MustUnixTime(sourceParam string, dest *time.Time) *ValueBinder {
12521252
return b.unixTime(sourceParam, dest, true, time.Second)
12531253
}
@@ -1257,7 +1257,7 @@ func (b *ValueBinder) MustUnixTime(sourceParam string, dest *time.Time) *ValueBi
12571257
// Example: 1647184410140 bind to 2022-03-13T15:13:30.140000000+00:00
12581258
//
12591259
// Note:
1260-
// * time.Time{} (param is empty) and time.Unix(0,0) (param = "0") are not equal
1260+
// - time.Time{} (param is empty) and time.Unix(0,0) (param = "0") are not equal
12611261
func (b *ValueBinder) UnixTimeMilli(sourceParam string, dest *time.Time) *ValueBinder {
12621262
return b.unixTime(sourceParam, dest, false, time.Millisecond)
12631263
}
@@ -1268,7 +1268,7 @@ func (b *ValueBinder) UnixTimeMilli(sourceParam string, dest *time.Time) *ValueB
12681268
// Example: 1647184410140 bind to 2022-03-13T15:13:30.140000000+00:00
12691269
//
12701270
// Note:
1271-
// * time.Time{} (param is empty) and time.Unix(0,0) (param = "0") are not equal
1271+
// - time.Time{} (param is empty) and time.Unix(0,0) (param = "0") are not equal
12721272
func (b *ValueBinder) MustUnixTimeMilli(sourceParam string, dest *time.Time) *ValueBinder {
12731273
return b.unixTime(sourceParam, dest, true, time.Millisecond)
12741274
}
@@ -1280,8 +1280,8 @@ func (b *ValueBinder) MustUnixTimeMilli(sourceParam string, dest *time.Time) *Va
12801280
// Example: 999999999 binds to 1970-01-01T00:00:00.999999999+00:00
12811281
//
12821282
// Note:
1283-
// * time.Time{} (param is empty) and time.Unix(0,0) (param = "0") are not equal
1284-
// * Javascript's Number type only has about 53 bits of precision (Number.MAX_SAFE_INTEGER = 9007199254740991). Compare it to 1609180603123456789 in example.
1283+
// - time.Time{} (param is empty) and time.Unix(0,0) (param = "0") are not equal
1284+
// - Javascript's Number type only has about 53 bits of precision (Number.MAX_SAFE_INTEGER = 9007199254740991). Compare it to 1609180603123456789 in example.
12851285
func (b *ValueBinder) UnixTimeNano(sourceParam string, dest *time.Time) *ValueBinder {
12861286
return b.unixTime(sourceParam, dest, false, time.Nanosecond)
12871287
}
@@ -1294,8 +1294,8 @@ func (b *ValueBinder) UnixTimeNano(sourceParam string, dest *time.Time) *ValueBi
12941294
// Example: 999999999 binds to 1970-01-01T00:00:00.999999999+00:00
12951295
//
12961296
// Note:
1297-
// * time.Time{} (param is empty) and time.Unix(0,0) (param = "0") are not equal
1298-
// * Javascript's Number type only has about 53 bits of precision (Number.MAX_SAFE_INTEGER = 9007199254740991). Compare it to 1609180603123456789 in example.
1297+
// - time.Time{} (param is empty) and time.Unix(0,0) (param = "0") are not equal
1298+
// - Javascript's Number type only has about 53 bits of precision (Number.MAX_SAFE_INTEGER = 9007199254740991). Compare it to 1609180603123456789 in example.
12991299
func (b *ValueBinder) MustUnixTimeNano(sourceParam string, dest *time.Time) *ValueBinder {
13001300
return b.unixTime(sourceParam, dest, true, time.Nanosecond)
13011301
}

middleware/basic_auth.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ package middleware
22

33
import (
44
"encoding/base64"
5+
"net/http"
56
"strconv"
67
"strings"
7-
"net/http"
88

99
"github.com/labstack/echo/v4"
1010
)

middleware/decompress.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ type (
2020
}
2121
)
2222

23-
//GZIPEncoding content-encoding header if set to "gzip", decompress body contents.
23+
// GZIPEncoding content-encoding header if set to "gzip", decompress body contents.
2424
const GZIPEncoding string = "gzip"
2525

2626
// Decompressor is used to get the sync.Pool used by the middleware to get Gzip readers
@@ -44,12 +44,12 @@ func (d *DefaultGzipDecompressPool) gzipDecompressPool() sync.Pool {
4444
return sync.Pool{New: func() interface{} { return new(gzip.Reader) }}
4545
}
4646

47-
//Decompress decompresses request body based if content encoding type is set to "gzip" with default config
47+
// Decompress decompresses request body based if content encoding type is set to "gzip" with default config
4848
func Decompress() echo.MiddlewareFunc {
4949
return DecompressWithConfig(DefaultDecompressConfig)
5050
}
5151

52-
//DecompressWithConfig decompresses request body based if content encoding type is set to "gzip" with config
52+
// DecompressWithConfig decompresses request body based if content encoding type is set to "gzip" with config
5353
func DecompressWithConfig(config DecompressConfig) echo.MiddlewareFunc {
5454
// Defaults
5555
if config.Skipper == nil {

0 commit comments

Comments
 (0)