Skip to content

Commit 31311d3

Browse files
author
Claude
committed
fix assignOp linting errors
1 parent 1bb7942 commit 31311d3

File tree

7 files changed

+7
-7
lines changed

7 files changed

+7
-7
lines changed

cli/help.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ var usageTemplate = func() *template.Template {
190190
},
191191
"formatGroupDescription": func(s string) string {
192192
s = strings.ReplaceAll(s, "\n", "")
193-
s = s + "\n"
193+
s += "\n"
194194
s = wrapTTY(s)
195195
return s
196196
},

cli/root.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1045,7 +1045,7 @@ func formatMultiError(from string, multi []error, opts *formatOpts) string {
10451045
prefix := fmt.Sprintf("%d. ", i+1)
10461046
if len(prefix) < len(indent) {
10471047
// Indent the prefix to match the indent
1048-
prefix = prefix + strings.Repeat(" ", len(indent)-len(prefix))
1048+
prefix += strings.Repeat(" ", len(indent)-len(prefix))
10491049
}
10501050
errStr = prefix + errStr
10511051
// Now looks like

cli/util.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ func parseCLISchedule(parts ...string) (*cron.Schedule, error) {
167167
func parseDuration(raw string) (time.Duration, error) {
168168
// If the user input a raw number, assume minutes
169169
if isDigit(raw) {
170-
raw = raw + "m"
170+
raw += "m"
171171
}
172172
d, err := time.ParseDuration(raw)
173173
if err != nil {

coderd/prometheusmetrics/insights/metricscollector.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ func convertParameterInsights(rows []database.GetTemplateParameterInsightsRow) [
287287
if _, ok := m[key]; !ok {
288288
m[key] = 0
289289
}
290-
m[key] = m[key] + r.Count
290+
m[key] += r.Count
291291
}
292292
}
293293

coderd/workspaceapps/appurl/appurl.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ func CompileHostnamePattern(pattern string) (*regexp.Regexp, error) {
267267
regexPattern = strings.Replace(regexPattern, "*", "([^.]+)", 1)
268268

269269
// Allow trailing period.
270-
regexPattern = regexPattern + "\\.?"
270+
regexPattern += "\\.?"
271271

272272
// Allow optional port number.
273273
regexPattern += "(:\\d+)?"

enterprise/coderd/license/license.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -389,7 +389,7 @@ func ParseClaimsIgnoreNbf(rawJWT string, keys map[string]ed25519.PublicKey) (*Cl
389389
var vErr *jwt.ValidationError
390390
if xerrors.As(err, &vErr) {
391391
// zero out the NotValidYet error to check if there were other problems
392-
vErr.Errors = vErr.Errors & (^jwt.ValidationErrorNotValidYet)
392+
vErr.Errors &= (^jwt.ValidationErrorNotValidYet)
393393
if vErr.Errors != 0 {
394394
// There are other errors besides not being valid yet. We _could_ go
395395
// through all the jwt.ValidationError bits and try to work out the

enterprise/dbcrypt/cipher_internal_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ func TestCipherAES256(t *testing.T) {
5959

6060
munged := make([]byte, len(encrypted1))
6161
copy(munged, encrypted1)
62-
munged[0] = munged[0] ^ 0xff
62+
munged[0] ^= 0xff
6363
_, err = cipher.Decrypt(munged)
6464
var decryptErr *DecryptFailedError
6565
require.ErrorAs(t, err, &decryptErr, "munging the first byte of the encrypted data should cause decryption to fail")

0 commit comments

Comments
 (0)