Polish code

This commit is contained in:
AlexSSD7 2023-08-29 14:24:18 +01:00
commit 0870f8113a
10 changed files with 246 additions and 238 deletions

View file

@ -38,7 +38,7 @@ func NewBuildContext(logger *slog.Logger, baseISOPath string, outPath string, sh
return nil, errors.Wrap(err, "stat output file")
}
// File doesn't exist. Continuing.
// File doesn't exist. Going forward with creating a new .qcow2 image.
} else {
return nil, fmt.Errorf("output file already exists")
}
@ -183,8 +183,6 @@ func runAlpineSetupCmd(sc *ssh.Client, pkgs []string) error {
return errors.Wrap(err, "new session")
}
// TODO: Timeout for this command.
stderr := bytes.NewBuffer(nil)
sess.Stderr = stderr

View file

@ -61,7 +61,7 @@ var runCmd = &cobra.Command{
return 1
}
err = fm.StartFTP([]byte(sharePWD), networkSharePort+1, ftpPassivePortCount)
err = fm.StartFTP(sharePWD, networkSharePort+1, ftpPassivePortCount)
if err != nil {
slog.Error("Failed to start FTP server", "error", err.Error())
return 1