More linting fixes

This commit is contained in:
AlexSSD7 2023-09-02 12:09:26 +01:00
commit 52cd7e21cb
3 changed files with 4 additions and 4 deletions

View file

@ -14,9 +14,9 @@ import (
"github.com/AlexSSD7/linsk/vm" "github.com/AlexSSD7/linsk/vm"
) )
type RunVMFunc func(context.Context, *vm.VM, *vm.FileManager, *share.NetTapRuntimeContext) int type Func func(context.Context, *vm.VM, *vm.FileManager, *share.NetTapRuntimeContext) int
func RunVM(vi *vm.VM, initFileManager bool, tapRuntimeCtx *share.NetTapRuntimeContext, fn RunVMFunc) int { func RunVM(vi *vm.VM, initFileManager bool, tapRuntimeCtx *share.NetTapRuntimeContext, fn Func) int {
runErrCh := make(chan error, 1) runErrCh := make(chan error, 1)
var wg sync.WaitGroup var wg sync.WaitGroup

View file

@ -30,7 +30,7 @@ func createStoreOrExit() *storage.Storage {
return store return store
} }
func runVM(passthroughArg string, fn runvm.RunVMFunc, forwardPortsRules []vm.PortForwardingRule, unrestrictedNetworking bool, withNetTap bool) int { func runVM(passthroughArg string, fn runvm.Func, forwardPortsRules []vm.PortForwardingRule, unrestrictedNetworking bool, withNetTap bool) int {
store := createStoreOrExit() store := createStoreOrExit()
vmImagePath, err := store.CheckVMImageExists() vmImagePath, err := store.CheckVMImageExists()

View file

@ -5,7 +5,7 @@ import "runtime"
// For some reason, `runtime` package does not provide this while // For some reason, `runtime` package does not provide this while
// "goconst" linter complains about us not using constants in // "goconst" linter complains about us not using constants in
// expressions like `runtime.GOOS == "windows"`. And it is // expressions like `runtime.GOOS == "windows"`. And it is
// not wrong, accidentally mispelling these OS IDs is a // not wrong, accidentally misspelling these OS IDs is a
// matter of time. // matter of time.
func IsWindows() bool { func IsWindows() bool {