Linting: address aslint

This commit is contained in:
AlexSSD7 2023-09-01 16:40:13 +01:00
commit a0bdcca73f

View file

@ -242,7 +242,7 @@ func NewVM(logger *slog.Logger, cfg VMConfig) (*VM, error) {
} }
if cfg.InstallBaseUtilities && !cfg.UnrestrictedNetworking { if cfg.InstallBaseUtilities && !cfg.UnrestrictedNetworking {
return nil, fmt.Errorf("cannot install base utilities with unrestricted networking disabled") return nil, fmt.Errorf("installation of base utilities is impossible with unrestricted networking disabled")
} }
// NOTE: The default timeouts below have no relation to the default // NOTE: The default timeouts below have no relation to the default
@ -514,7 +514,7 @@ func (vm *VM) runVMLoginHandler() error {
if bytes.Contains(peek, []byte("login:")) { if bytes.Contains(peek, []byte("login:")) {
err = vm.writeSerial([]byte("root\n")) err = vm.writeSerial([]byte("root\n"))
if err != nil { if err != nil {
return errors.Wrap(err, "failed to stdio write login") return errors.Wrap(err, "stdio write login")
} }
vm.logger.Debug("Logged into the VM serial") vm.logger.Debug("Logged into the VM serial")
@ -558,7 +558,7 @@ func (vm *VM) DialSCP() (*scp.Client, error) {
sc := scp.NewClient("localhost:"+fmt.Sprint(vm.sshMappedPort), vm.sshConf) sc := scp.NewClient("localhost:"+fmt.Sprint(vm.sshMappedPort), vm.sshConf)
err := sc.Connect() err := sc.Connect()
if err != nil { if err != nil {
return nil, err return nil, errors.Wrap(err, "connect")
} }
return &sc, nil return &sc, nil