Skip to content

Commit 17389a4

Browse files
fixed linter warnings
1 parent b5f84ee commit 17389a4

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

internal/controller/config.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ type Config struct {
2424
Organization string
2525
}
2626

27+
// ValidTemplate verifies that at least one placeholder is present
28+
// in the provided template t.
2729
func ValidTemplate(t string) bool {
2830
hasPlaceholder := strings.Contains(t, TmplNS) ||
2931
strings.Contains(t, TmplDN) ||

pkg/deploymentrecord/client.go

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@ import (
2222
// ClientOption is a function that configures the Client.
2323
type ClientOption func(*Client)
2424

25-
// validOrgPattern validates organization names (alphanumeric, hyphens, underscores)
25+
// validOrgPattern validates organization names (alphanumeric, hyphens,
26+
// underscores).
2627
var validOrgPattern = regexp.MustCompile(`^[a-zA-Z0-9_-]+$`)
2728

2829
// Client is an API client for posting deployment records.
@@ -143,7 +144,9 @@ func (c *Client) PostOne(ctx context.Context, record *DeploymentRecord) error {
143144
// The first attempt is not a retry!
144145
for attempt := range c.retries + 1 {
145146
if attempt > 0 {
146-
backoff := time.Duration(math.Pow(2, float64(attempt))) * 100 * time.Millisecond
147+
backoff := time.Duration(math.Pow(2,
148+
float64(attempt))) * 100 * time.Millisecond
149+
//nolint:gosec
147150
jitter := time.Duration(rand.Int64N(50)) * time.Millisecond
148151
delay := backoff + jitter
149152

0 commit comments

Comments
 (0)