mirror of
https://github.com/luckfox-eng29/kvm.git
synced 2026-01-18 03:28:19 +01:00
refactor: update golintci-lint and linter issues
* Update golangci-lint Update golangci-lint to v2. Signed-off-by: SuperQ <superq@gmail.com> * Fixup various linter issues. Signed-off-by: SuperQ <superq@gmail.com> --------- Signed-off-by: SuperQ <superq@gmail.com>
This commit is contained in:
@@ -62,11 +62,11 @@ func onDiskMessage(msg webrtc.DataChannelMessage) {
|
||||
func mountImage(imagePath string) error {
|
||||
err := setMassStorageImage("")
|
||||
if err != nil {
|
||||
return fmt.Errorf("Remove Mass Storage Image Error: %w", err)
|
||||
return fmt.Errorf("remove Mass Storage Image Error: %w", err)
|
||||
}
|
||||
err = setMassStorageImage(imagePath)
|
||||
if err != nil {
|
||||
return fmt.Errorf("Set Mass Storage Image Error: %w", err)
|
||||
return fmt.Errorf("set Mass Storage Image Error: %w", err)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
@@ -476,10 +476,8 @@ func handleUploadChannel(d *webrtc.DataChannel) {
|
||||
}
|
||||
totalBytesWritten += int64(bytesWritten)
|
||||
|
||||
sendProgress := false
|
||||
if time.Since(lastProgressTime) >= 200*time.Millisecond {
|
||||
sendProgress = true
|
||||
}
|
||||
sendProgress := time.Since(lastProgressTime) >= 200*time.Millisecond
|
||||
|
||||
if totalBytesWritten >= pendingUpload.Size {
|
||||
sendProgress = true
|
||||
close(uploadComplete)
|
||||
|
||||
Reference in New Issue
Block a user