Linting fixes + FileManager share start refactor

This commit is contained in:
AlexSSD7 2023-09-02 12:07:30 +01:00
commit b15e2df3d3
11 changed files with 66 additions and 120 deletions

View file

@ -135,7 +135,7 @@ func init() {
defaultShareType = "ftp"
}
runCmd.Flags().StringVar(&shareBackendFlag, "share-backend", defaultShareType, "Specifies the file share backend to use. The default value is OS-specific.")
runCmd.Flags().StringVar(&shareBackendFlag, "share-backend", defaultShareType, `Specifies the file share backend to use. The default value is OS-specific. (available "smb", "afp", "ftp")`)
runCmd.Flags().StringVar(&shareListenIPFlag, "share-listen", share.GetDefaultListenIPStr(), "Specifies the IP to bind the network share port to. NOTE: For FTP, changing the bind address is not enough to connect remotely. You should also specify --ftp-extip.")
runCmd.Flags().StringVar(&ftpExtIPFlag, "ftp-extip", share.GetDefaultListenIPStr(), "Specifies the external IP the FTP server should advertise.")

View file

@ -1,6 +1,7 @@
package cmd
import (
"context"
"fmt"
"os"
"path/filepath"
@ -43,7 +44,7 @@ func runVM(passthroughArg string, fn runvm.RunVMFunc, forwardPortsRules []vm.Por
return 1
}
biosPath, err := store.CheckDownloadVMBIOS()
biosPath, err := store.CheckDownloadVMBIOS(context.Background())
if err != nil {
slog.Error("Failed to check/download VM BIOS", "error", err.Error())
return 1
@ -171,7 +172,7 @@ func runVM(passthroughArg string, fn runvm.RunVMFunc, forwardPortsRules []vm.Por
}}
}
vmCfg := vm.VMConfig{
vmCfg := vm.Config{
Drives: []vm.DriveConfig{{
Path: vmImagePath,
SnapshotMode: true,