mirror of
https://github.com/luckfox-eng29/kvm.git
synced 2026-01-18 03:28:19 +01:00
Chore: Fix up various linting issues
In prep to add golangci-lint, fix various linting issues. * Make the `kvm` package a fully-qualified public package. Signed-off-by: SuperQ <superq@gmail.com>
This commit is contained in:
4
hw.go
4
hw.go
@@ -14,7 +14,7 @@ func extractSerialNumber() (string, error) {
|
||||
return "", err
|
||||
}
|
||||
|
||||
r, err := regexp.Compile("Serial\\s*:\\s*(\\S+)")
|
||||
r, err := regexp.Compile(`Serial\s*:\s*(\S+)`)
|
||||
if err != nil {
|
||||
return "", fmt.Errorf("failed to compile regex: %w", err)
|
||||
}
|
||||
@@ -27,7 +27,7 @@ func extractSerialNumber() (string, error) {
|
||||
return matches[1], nil
|
||||
}
|
||||
|
||||
func readOtpEntropy() ([]byte, error) {
|
||||
func readOtpEntropy() ([]byte, error) { //nolint:unused
|
||||
content, err := os.ReadFile("/sys/bus/nvmem/devices/rockchip-otp0/nvmem")
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
||||
Reference in New Issue
Block a user