Skip to content

Commit a8a7eac

Browse files
authored
Merge pull request #1000 from asmyasnikov/master
enable durationcheck linter
2 parents de66cdd + 7a83bf5 commit a8a7eac

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

.golangci.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,6 @@ linters:
213213
- depguard
214214
- dupl
215215
- dupword
216-
- durationcheck
217216
- errname
218217
- exhaustive
219218
- exhaustivestruct

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
* Refactored `internal/value/intervalValue.Yql()`
2+
13
## v3.54.3
24
* Added per message metadata support for topic api
35
* Context for call options now have same lifetime as driver (previous - same lifetime as context for call Open function).

internal/value/value.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -928,20 +928,20 @@ func (v intervalValue) Yql() string {
928928
}
929929
buffer.WriteByte('P')
930930
if days := d / time.Hour / 24; days > 0 {
931-
d -= days * time.Hour * 24
931+
d -= days * time.Hour * 24 //nolint:durationcheck
932932
buffer.WriteString(strconv.FormatInt(int64(days), 10))
933933
buffer.WriteByte('D')
934934
}
935935
if d > 0 {
936936
buffer.WriteByte('T')
937937
}
938938
if hours := d / time.Hour; hours > 0 {
939-
d -= hours * time.Hour
939+
d -= hours * time.Hour //nolint:durationcheck
940940
buffer.WriteString(strconv.FormatInt(int64(hours), 10))
941941
buffer.WriteByte('H')
942942
}
943943
if minutes := d / time.Minute; minutes > 0 {
944-
d -= minutes * time.Minute
944+
d -= minutes * time.Minute //nolint:durationcheck
945945
buffer.WriteString(strconv.FormatInt(int64(minutes), 10))
946946
buffer.WriteByte('M')
947947
}

0 commit comments

Comments
 (0)