Skip to content

Commit 87eccea

Browse files
committed
chore: enable stringXbytes rule from go-critic
Signed-off-by: Matthieu MOREL <[email protected]>
1 parent 47cd709 commit 87eccea

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

.golangci.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ linters:
2626
- importShadow
2727
- paramTypeCombine
2828
- rangeValCopy
29-
- stringXbytes
3029
- typeSwitchVar
3130
- unnamedResult
3231
- whyNoLint

pkg/diff/diff.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -473,7 +473,7 @@ func normalizeTypedValue(tv *typed.TypedValue) ([]byte, error) {
473473

474474
func buildDiffResult(predictedBytes []byte, liveBytes []byte) *DiffResult {
475475
return &DiffResult{
476-
Modified: string(liveBytes) != string(predictedBytes),
476+
Modified: !bytes.Equal(liveBytes, predictedBytes),
477477
NormalizedLive: liveBytes,
478478
PredictedLive: predictedBytes,
479479
}

0 commit comments

Comments
 (0)