• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

mendersoftware / workflows / 1354855011

01 Jul 2024 12:34AM UTC coverage: 81.632% (-0.3%) from 81.882%
1354855011

Pull #327

gitlab-ci

web-flow
chore: bump golang in the docker-dependencies group

Bumps the docker-dependencies group with 1 update: golang.


Updates `golang` from 1.22.3-alpine3.19 to 1.22.4-alpine3.19

---
updated-dependencies:
- dependency-name: golang
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: docker-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
Pull Request #327: chore: bump golang from 1.22.3-alpine3.19 to 1.22.4-alpine3.19 in the docker-dependencies group

1631 of 1998 relevant lines covered (81.63%)

14.39 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

94.44
/app/worker/timer.go
1
// Copyright 2022 Northern.tech AS
2
//
3
//    Licensed under the Apache License, Version 2.0 (the "License");
4
//    you may not use this file except in compliance with the License.
5
//    You may obtain a copy of the License at
6
//
7
//        http://www.apache.org/licenses/LICENSE-2.0
8
//
9
//    Unless required by applicable law or agreed to in writing, software
10
//    distributed under the License is distributed on an "AS IS" BASIS,
11
//    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
//    See the License for the specific language governing permissions and
13
//    limitations under the License.
14

15
package worker
16

17
import "time"
18

19
// reusableTimer allows using the time.After interface without reallocations.
20
type reusableTimer time.Timer
21

22
func newStoppedTimer() *reusableTimer {
20✔
23
        t := (*reusableTimer)(time.NewTimer(0))
20✔
24
        t.Stop()
20✔
25
        return t
20✔
26
}
20✔
27

28
// Stop ensures that the timer is stopped and the channel is cleared.
29
func (t *reusableTimer) Stop() {
59✔
30
        if (*time.Timer)(t).Stop() {
97✔
31
                select {
38✔
32
                case <-t.C:
×
33
                default:
38✔
34
                }
35
        }
36
}
37

38
func (t *reusableTimer) Reset(d time.Duration) {
29✔
39
        t.Stop()
29✔
40
        (*time.Timer)(t).Reset(d)
29✔
41
}
29✔
42

43
func (t *reusableTimer) After(d time.Duration) <-chan time.Time {
20✔
44
        t.Reset(d)
20✔
45
        return t.C
20✔
46
}
20✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc