Linting: address aslint
This commit is contained in:
parent
ab519c54dc
commit
a0bdcca73f
1 changed files with 3 additions and 3 deletions
6
vm/vm.go
6
vm/vm.go
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue