Skip to content

Commit 900913b

Browse files
committed
chore(deps): updated dependencies & relinted
Signed-off-by: Frederic BIDON <fredbi@yahoo.com>
1 parent e9d6155 commit 900913b

File tree

6 files changed

+10
-10
lines changed

6 files changed

+10
-10
lines changed

.golangci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ linters:
1616
- godox
1717
- gosmopolitan
1818
- inamedparam
19-
- intrange # disabled while < go1.22
19+
#- intrange # disabled while < go1.22
2020
- ireturn
2121
- lll
2222
- musttag

default.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ func isValidIPv4(parts []string) bool {
288288
if len(digits) > 1 {
289289
const maxUint8 = uint64(^uint8(0))
290290

291-
for i := 0; i < len(digits)-2; i++ {
291+
for i := range len(digits) - 2 {
292292
if digits[i] > maxUint8 {
293293
return false
294294
}

default_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -928,7 +928,7 @@ func BenchmarkIsUUID(b *testing.B) {
928928
uuid4s := make([]string, 0, sampleSize)
929929
uuid5s := make([]string, 0, sampleSize)
930930

931-
for i := 0; i < sampleSize; i++ {
931+
for range sampleSize {
932932
seed := []byte(uuid.Must(uuid.NewRandom()).String())
933933
uuids = append(uuids, uuid.Must(uuid.NewRandom()).String())
934934
uuid3s = append(uuid3s, uuid.NewMD5(uuid.NameSpaceURL, seed).String())
@@ -954,8 +954,8 @@ func benchmarkIs(input []string, fn func(string) bool) func(*testing.B) {
954954
var isTrue bool
955955
b.ReportAllocs()
956956
b.ResetTimer()
957-
for i := 0; i < b.N; i++ {
958-
isTrue = fn(input[i%len(input)])
957+
for b.Loop() {
958+
isTrue = fn(input[b.N%len(input)])
959959
}
960960
fmt.Fprintln(io.Discard, isTrue)
961961
}

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ module github.com/go-openapi/strfmt
22

33
require (
44
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2
5-
github.com/go-openapi/errors v0.22.2
5+
github.com/go-openapi/errors v0.22.3
66
github.com/go-viper/mapstructure/v2 v2.4.0
77
github.com/google/uuid v1.6.0
88
github.com/oklog/ulid v1.3.1

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2 h1:DklsrG3d
22
github.com/asaskevich/govalidator v0.0.0-20230301143203-a9d515a09cc2/go.mod h1:WaHUgvxTVq04UNunO+XhnAqY/wQc+bxr74GqbsZ/Jqw=
33
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
44
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
5-
github.com/go-openapi/errors v0.22.2 h1:rdxhzcBUazEcGccKqbY1Y7NS8FDcMyIRr0934jrYnZg=
6-
github.com/go-openapi/errors v0.22.2/go.mod h1:+n/5UdIqdVnLIJ6Q9Se8HNGUXYaY6CN8ImWzfi/Gzp0=
5+
github.com/go-openapi/errors v0.22.3 h1:k6Hxa5Jg1TUyZnOwV2Lh81j8ayNw5VVYLvKrp4zFKFs=
6+
github.com/go-openapi/errors v0.22.3/go.mod h1:+WvbaBBULWCOna//9B9TbLNGSFOfF8lY9dw4hGiEiKQ=
77
github.com/go-viper/mapstructure/v2 v2.4.0 h1:EBsztssimR/CONLSZZ04E8qAkxNYq4Qp9LvH92wZUgs=
88
github.com/go-viper/mapstructure/v2 v2.4.0/go.mod h1:oJDH3BJKyqBA2TXFhDsKDGDTlndYOZ6rGS0BRZIxGhM=
99
github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI=

time.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ const (
8282
ISO8601TimeWithReducedPrecisionLocaltime = "2006-01-02T15:04"
8383
// ISO8601TimeUniversalSortableDateTimePattern represents a ISO8601 universal sortable date time pattern.
8484
ISO8601TimeUniversalSortableDateTimePattern = "2006-01-02 15:04:05"
85-
// short form of ISO8601TimeUniversalSortableDateTimePattern
85+
// ISO8601TimeUniversalSortableDateTimePatternShortForm is the short form of ISO8601TimeUniversalSortableDateTimePattern
8686
ISO8601TimeUniversalSortableDateTimePatternShortForm = "2006-01-02"
8787
// DateTimePattern pattern to match for the date-time format from http://tools.ietf.org/html/rfc3339#section-5.6
8888
DateTimePattern = `^([0-9]{2}):([0-9]{2}):([0-9]{2})(.[0-9]+)?(z|([+-][0-9]{2}:[0-9]{2}))$`
@@ -157,7 +157,7 @@ func (t DateTime) IsZero() bool {
157157
return time.Time(t).IsZero()
158158
}
159159

160-
// IsUnixZerom returns whether the date time is equivalent to time.Unix(0, 0).UTC().
160+
// IsUnixZero returns whether the date time is equivalent to time.Unix(0, 0).UTC().
161161
func (t DateTime) IsUnixZero() bool {
162162
return time.Time(t).Equal(UnixZero)
163163
}

0 commit comments

Comments
 (0)