lint: fix issues of errorlint, forcetypeassert... #328
Annotations
10 errors
lint:
platforms/holystone/hs200/hs200_driver.go#L180
assignOp: replace `cmd = cmd * float32(maxv)` with `cmd *= float32(maxv)` (gocritic)
|
lint:
api/api.go#L182
ifElseChain: rewrite if-else to switch statement (gocritic)
|
lint:
api/cors.go#L56
wrapperFunc: use strings.ReplaceAll method in `strings.Replace(pattern, "\\*", ".*", -1)` (gocritic)
|
lint:
api/cors.go#L57
wrapperFunc: use strings.ReplaceAll method in `strings.Replace(pattern, "\\?", ".", -1)` (gocritic)
|
lint:
platforms/sphero/sphero_driver.go#L197
appendAssign: append result not assigned to the same slice (gocritic)
|
lint:
platforms/sphero/sphero_driver.go#L424
appendAssign: append result not assigned to the same slice (gocritic)
|
lint:
platforms/sphero/sphero_driver.go#L439
appendAssign: append result not assigned to the same slice (gocritic)
|
lint:
system/digitalpin_sysfs.go#L199
elseif: can replace 'else {if cond {}}' with 'else if cond {}' (gocritic)
|
lint:
system/spi_gpio.go#L141
assignOp: replace `bitMask = bitMask >> 1` with `bitMask >>= 1` (gocritic)
|
lint:
platforms/firmata/client/client.go#L516
assignOp: replace `i = i + 2` with `i += 2` (gocritic)
|