diff --git a/cmd/blind_update.go b/cmd/blind_update.go index cd755c5..c2fd10c 100644 --- a/cmd/blind_update.go +++ b/cmd/blind_update.go @@ -8,8 +8,8 @@ import ( "github.com/FAU-CDI/wisski-distillery/internal/cli" "github.com/FAU-CDI/wisski-distillery/internal/wisski" "github.com/tkw1536/goprogram/exit" - "github.com/tkw1536/goprogram/status" "github.com/tkw1536/pkglib/collection" + "github.com/tkw1536/pkglib/status" ) // BlindUpdate is the 'blind_update' command diff --git a/cmd/cron.go b/cmd/cron.go index 6a18650..3dd0e22 100644 --- a/cmd/cron.go +++ b/cmd/cron.go @@ -8,7 +8,7 @@ import ( "github.com/FAU-CDI/wisski-distillery/internal/cli" "github.com/FAU-CDI/wisski-distillery/internal/wisski" "github.com/tkw1536/goprogram/exit" - "github.com/tkw1536/goprogram/status" + "github.com/tkw1536/pkglib/status" ) // Cron is the 'cron' command diff --git a/cmd/drupal_user.go b/cmd/drupal_user.go index a039d00..cdedd15 100644 --- a/cmd/drupal_user.go +++ b/cmd/drupal_user.go @@ -9,7 +9,7 @@ import ( wstatus "github.com/FAU-CDI/wisski-distillery/internal/status" "github.com/FAU-CDI/wisski-distillery/internal/wisski" "github.com/tkw1536/goprogram/exit" - "github.com/tkw1536/goprogram/status" + "github.com/tkw1536/pkglib/status" ) // DrupalUser is the 'drupal_user' setting diff --git a/cmd/rebuild.go b/cmd/rebuild.go index 8e05127..6f235c3 100644 --- a/cmd/rebuild.go +++ b/cmd/rebuild.go @@ -8,7 +8,7 @@ import ( "github.com/FAU-CDI/wisski-distillery/internal/cli" "github.com/FAU-CDI/wisski-distillery/internal/wisski" "github.com/tkw1536/goprogram/exit" - "github.com/tkw1536/goprogram/status" + "github.com/tkw1536/pkglib/status" ) // Cron is the 'cron' command diff --git a/cmd/system_pause.go b/cmd/system_pause.go index 4444c2f..03f7165 100644 --- a/cmd/system_pause.go +++ b/cmd/system_pause.go @@ -11,7 +11,7 @@ import ( "github.com/FAU-CDI/wisski-distillery/internal/wisski" "github.com/FAU-CDI/wisski-distillery/pkg/logging" "github.com/tkw1536/goprogram/exit" - "github.com/tkw1536/goprogram/status" + "github.com/tkw1536/pkglib/status" ) // SystemPause is the 'system_pause' command diff --git a/cmd/system_update.go b/cmd/system_update.go index 80d3ed9..d87e4cd 100644 --- a/cmd/system_update.go +++ b/cmd/system_update.go @@ -13,7 +13,7 @@ import ( "github.com/FAU-CDI/wisski-distillery/pkg/logging" "github.com/tkw1536/goprogram/exit" "github.com/tkw1536/goprogram/parser" - "github.com/tkw1536/goprogram/status" + "github.com/tkw1536/pkglib/status" ) // SystemUpdate is the 'system_update' command diff --git a/cmd/update_prefix_config.go b/cmd/update_prefix_config.go index 0dda036..9ba74a0 100644 --- a/cmd/update_prefix_config.go +++ b/cmd/update_prefix_config.go @@ -9,7 +9,7 @@ import ( "github.com/FAU-CDI/wisski-distillery/internal/wisski" "github.com/tkw1536/goprogram/exit" - "github.com/tkw1536/goprogram/status" + "github.com/tkw1536/pkglib/status" ) // Cron is the 'cron' command diff --git a/cmd/wdcli/main.go b/cmd/wdcli/main.go index 6305517..c3f1633 100644 --- a/cmd/wdcli/main.go +++ b/cmd/wdcli/main.go @@ -10,7 +10,7 @@ import ( "github.com/FAU-CDI/wisski-distillery/cmd" "github.com/FAU-CDI/wisski-distillery/internal/cli" "github.com/tkw1536/goprogram/exit" - "github.com/tkw1536/goprogram/stream" + "github.com/tkw1536/pkglib/stream" ) var wdcli = wisski_distillery.NewProgram() @@ -95,7 +95,7 @@ func main() { // we don't need to even bother with the rest of the program // just immediatly return a custom error message. if len(os.Args) == 1 { - streams.Die(errNoArgumentsProvided) + exit.Die(streams, errNoArgumentsProvided) errNoArgumentsProvided.Return() return } @@ -105,7 +105,7 @@ func main() { err := func() error { params, err := cli.ParamsFromEnv() if err != nil { - return streams.Die(err) + return exit.Die(streams, err) } return wdcli.Main(streams, params, os.Args[1:]) diff --git a/go.mod b/go.mod index f3d3a9d..8e9fb43 100644 --- a/go.mod +++ b/go.mod @@ -15,8 +15,8 @@ require ( github.com/pkg/errors v0.9.1 github.com/pquerna/otp v1.4.0 github.com/rs/zerolog v1.29.0 - github.com/tkw1536/goprogram v0.3.3 - github.com/tkw1536/pkglib v0.0.0-20230309112229-8571d9173163 + github.com/tkw1536/goprogram v0.3.4 + github.com/tkw1536/pkglib v0.0.0-20230315183422-bdc7380721a8 github.com/yuin/goldmark v1.5.4 github.com/yuin/goldmark-meta v1.1.0 golang.org/x/crypto v0.7.0 diff --git a/go.sum b/go.sum index 8787daf..f23f12d 100644 --- a/go.sum +++ b/go.sum @@ -113,10 +113,10 @@ github.com/tdewolff/minify v2.3.6+incompatible/go.mod h1:9Ov578KJUmAWpS6NeZwRZyT github.com/tdewolff/parse v2.3.4+incompatible h1:x05/cnGwIMf4ceLuDMBOdQ1qGniMoxpP46ghf0Qzh38= github.com/tdewolff/parse v2.3.4+incompatible/go.mod h1:8oBwCsVmUkgHO8M5iCzSIDtpzXOT0WXX9cWhz+bIzJQ= github.com/tdewolff/test v1.0.7 h1:8Vs0142DmPFW/bQeHRP3MV19m1gvndjUb1sn8yy74LM= -github.com/tkw1536/goprogram v0.3.3 h1:5MWoniR/sXk/rb+LNiW01SlrR8kUuzbaPBNgGUSweis= -github.com/tkw1536/goprogram v0.3.3/go.mod h1:mzbobl44pmYw5VmXajqcFkytOUkYiP+EoMi0MK9PSMI= -github.com/tkw1536/pkglib v0.0.0-20230309112229-8571d9173163 h1:1s1uCeBiQFzsSY6Do7NUHfk6n40gDwdTVZPuCS0oAbc= -github.com/tkw1536/pkglib v0.0.0-20230309112229-8571d9173163/go.mod h1:R+8tKMAkSXC1+XGzxNUKx2DnPJqObycYeo4PKjWYkMg= +github.com/tkw1536/goprogram v0.3.4 h1:Fl9YadnL5E9DGiROY/i4ODyi5PVPySvpe7G7KmZV8XY= +github.com/tkw1536/goprogram v0.3.4/go.mod h1:pdhpcH0vbPFF+iaV3i3Ty+J0Fpv6QFn83e3LWbH09eQ= +github.com/tkw1536/pkglib v0.0.0-20230315183422-bdc7380721a8 h1:pVlqKX/6wzoNlP53rLqvhU+rZzBNh8Id2Kl1HEsQP4g= +github.com/tkw1536/pkglib v0.0.0-20230315183422-bdc7380721a8/go.mod h1:RjPEyRcq+g1GMd3D/o7d9WCtVNXY4QZyFRs9hLlZbew= github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb h1:zGWFAtiMcyryUHoUjUJX0/lt1H2+i2Ka2n+D3DImSNo= github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU= diff --git a/internal/dis/component/exporter/backup.go b/internal/dis/component/exporter/backup.go index f796763..03dfd27 100644 --- a/internal/dis/component/exporter/backup.go +++ b/internal/dis/component/exporter/backup.go @@ -12,7 +12,7 @@ import ( "github.com/FAU-CDI/wisski-distillery/pkg/fsx" "github.com/FAU-CDI/wisski-distillery/pkg/logging" - "github.com/tkw1536/goprogram/status" + "github.com/tkw1536/pkglib/status" "golang.org/x/exp/slices" ) @@ -84,7 +84,7 @@ func (backup *Backup) run(ctx context.Context, progress io.Writer, exporter *Exp st.Start() defer st.Stop() - errors := status.Group[component.Backupable, error]{ + errors, _ := status.Group[component.Backupable, error]{ PrefixString: func(item component.Backupable, index int) string { return fmt.Sprintf("[backup %q]: ", item.Name()) }, @@ -131,7 +131,7 @@ func (backup *Backup) run(ctx context.Context, progress io.Writer, exporter *Exp } // make a backup of the snapshots - backup.InstanceSnapshots = status.Group[*wisski.WissKI, Snapshot]{ + backup.InstanceSnapshots, _ = status.Group[*wisski.WissKI, Snapshot]{ PrefixString: func(item *wisski.WissKI, index int) string { return fmt.Sprintf("[snapshot %q]: ", item.Slug) }, diff --git a/internal/dis/component/exporter/iface.go b/internal/dis/component/exporter/iface.go index cd1b2bf..11dfcb0 100644 --- a/internal/dis/component/exporter/iface.go +++ b/internal/dis/component/exporter/iface.go @@ -14,7 +14,7 @@ import ( "github.com/FAU-CDI/wisski-distillery/pkg/fsx" "github.com/FAU-CDI/wisski-distillery/pkg/logging" "github.com/FAU-CDI/wisski-distillery/pkg/targz" - "github.com/tkw1536/goprogram/status" + "github.com/tkw1536/pkglib/status" ) // ExportTask describes a task that makes either a [Backup] or a [Snapshot]. diff --git a/internal/dis/component/exporter/snapshot.go b/internal/dis/component/exporter/snapshot.go index 0df4076..a4cbbc0 100644 --- a/internal/dis/component/exporter/snapshot.go +++ b/internal/dis/component/exporter/snapshot.go @@ -12,8 +12,8 @@ import ( "github.com/FAU-CDI/wisski-distillery/internal/wisski" "github.com/FAU-CDI/wisski-distillery/internal/wisski/ingredient/locker" "github.com/FAU-CDI/wisski-distillery/pkg/logging" - "github.com/tkw1536/goprogram/status" "github.com/tkw1536/pkglib/collection" + "github.com/tkw1536/pkglib/status" "golang.org/x/exp/slices" ) @@ -113,7 +113,7 @@ func (snapshot *Snapshot) makeParts(ctx context.Context, progress io.Writer, sna results := make(map[string]error, len(comps)) - errors := status.Group[component.Snapshotable, error]{ + errors, _ := status.Group[component.Snapshotable, error]{ PrefixString: func(item component.Snapshotable, index int) string { return fmt.Sprintf("[snapshot %q]: ", item.Name()) }, diff --git a/internal/dis/component/server/admin/socket/proto.go b/internal/dis/component/server/admin/socket/proto.go index 6cb29f9..f56238c 100644 --- a/internal/dis/component/server/admin/socket/proto.go +++ b/internal/dis/component/server/admin/socket/proto.go @@ -10,8 +10,8 @@ import ( "time" "github.com/gorilla/websocket" - "github.com/tkw1536/goprogram/status" "github.com/tkw1536/pkglib/httpx" + "github.com/tkw1536/pkglib/status" ) // ActionMap handles a set of WebSocket actions diff --git a/internal/dis/component/sql/backup.go b/internal/dis/component/sql/backup.go index 40b6678..1954ba5 100644 --- a/internal/dis/component/sql/backup.go +++ b/internal/dis/component/sql/backup.go @@ -6,7 +6,7 @@ import ( "io" "github.com/FAU-CDI/wisski-distillery/internal/dis/component" - "github.com/tkw1536/goprogram/stream" + "github.com/tkw1536/pkglib/stream" ) var errSQLBackup = errors.New("`SQLBackup': mysqldump returned non-zero exit code") diff --git a/internal/dis/component/sql/snapshot.go b/internal/dis/component/sql/snapshot.go index 0310db6..593fc41 100644 --- a/internal/dis/component/sql/snapshot.go +++ b/internal/dis/component/sql/snapshot.go @@ -6,7 +6,7 @@ import ( "github.com/FAU-CDI/wisski-distillery/internal/dis/component" "github.com/FAU-CDI/wisski-distillery/internal/models" - "github.com/tkw1536/goprogram/stream" + "github.com/tkw1536/pkglib/stream" ) func (*SQL) SnapshotNeedsRunning() bool { return false } diff --git a/internal/dis/component/sql/update.go b/internal/dis/component/sql/update.go index 44c69fa..97b84ff 100644 --- a/internal/dis/component/sql/update.go +++ b/internal/dis/component/sql/update.go @@ -10,8 +10,8 @@ import ( "github.com/FAU-CDI/wisski-distillery/pkg/logging" "github.com/tkw1536/goprogram/exit" - "github.com/tkw1536/goprogram/stream" "github.com/tkw1536/pkglib/sqlx" + "github.com/tkw1536/pkglib/stream" "github.com/tkw1536/pkglib/timex" ) diff --git a/internal/dis/component/stack.go b/internal/dis/component/stack.go index 88b5633..f3b45d3 100644 --- a/internal/dis/component/stack.go +++ b/internal/dis/component/stack.go @@ -14,7 +14,7 @@ import ( "github.com/FAU-CDI/wisski-distillery/pkg/fsx" "github.com/FAU-CDI/wisski-distillery/pkg/unpack" "github.com/pkg/errors" - "github.com/tkw1536/goprogram/stream" + "github.com/tkw1536/pkglib/stream" ) // Stack represents a 'docker compose' stack living in a specific directory diff --git a/internal/phpx/php.go b/internal/phpx/php.go index 830be92..956c84e 100644 --- a/internal/phpx/php.go +++ b/internal/phpx/php.go @@ -4,7 +4,7 @@ package phpx import ( "context" - "github.com/tkw1536/goprogram/stream" + "github.com/tkw1536/pkglib/stream" ) // Executor represents anything that can spawn diff --git a/internal/phpx/server.go b/internal/phpx/server.go index eb95236..da311f4 100644 --- a/internal/phpx/server.go +++ b/internal/phpx/server.go @@ -11,11 +11,11 @@ import ( _ "embed" - "github.com/tkw1536/goprogram/stream" "github.com/tkw1536/pkglib/collection" "github.com/tkw1536/pkglib/contextx" "github.com/tkw1536/pkglib/lazy" "github.com/tkw1536/pkglib/nobufio" + "github.com/tkw1536/pkglib/stream" ) // Server represents a server that executes PHP code. diff --git a/internal/wisski/ingredient/barrel/drush/cron.go b/internal/wisski/ingredient/barrel/drush/cron.go index 577f71c..d4ade99 100644 --- a/internal/wisski/ingredient/barrel/drush/cron.go +++ b/internal/wisski/ingredient/barrel/drush/cron.go @@ -11,7 +11,7 @@ import ( "github.com/FAU-CDI/wisski-distillery/internal/status" "github.com/FAU-CDI/wisski-distillery/internal/wisski/ingredient" "github.com/tkw1536/goprogram/exit" - "github.com/tkw1536/goprogram/stream" + "github.com/tkw1536/pkglib/stream" ) var errCronFailed = exit.Error{ diff --git a/internal/wisski/ingredient/barrel/drush/update.go b/internal/wisski/ingredient/barrel/drush/update.go index c47f75b..20b5c2b 100644 --- a/internal/wisski/ingredient/barrel/drush/update.go +++ b/internal/wisski/ingredient/barrel/drush/update.go @@ -10,7 +10,7 @@ import ( "github.com/FAU-CDI/wisski-distillery/internal/wisski/ingredient" "github.com/FAU-CDI/wisski-distillery/internal/wisski/ingredient/mstore" "github.com/tkw1536/goprogram/exit" - "github.com/tkw1536/goprogram/stream" + "github.com/tkw1536/pkglib/stream" ) var errBlindUpdateFailed = exit.Error{ diff --git a/internal/wisski/ingredient/barrel/provisioner/provisioner.go b/internal/wisski/ingredient/barrel/provisioner/provisioner.go index 0561a86..592d6c5 100644 --- a/internal/wisski/ingredient/barrel/provisioner/provisioner.go +++ b/internal/wisski/ingredient/barrel/provisioner/provisioner.go @@ -9,7 +9,7 @@ import ( "github.com/FAU-CDI/wisski-distillery/internal/wisski/ingredient" "github.com/FAU-CDI/wisski-distillery/internal/wisski/ingredient/barrel" "github.com/alessio/shellescape" - "github.com/tkw1536/goprogram/stream" + "github.com/tkw1536/pkglib/stream" ) // Provisioner provides provisioning for a barrel diff --git a/internal/wisski/ingredient/barrel/shell.go b/internal/wisski/ingredient/barrel/shell.go index 66aef1b..ea871c3 100644 --- a/internal/wisski/ingredient/barrel/shell.go +++ b/internal/wisski/ingredient/barrel/shell.go @@ -3,7 +3,7 @@ package barrel import ( "context" - "github.com/tkw1536/goprogram/stream" + "github.com/tkw1536/pkglib/stream" ) // Shell executes a shell command inside the instance. diff --git a/internal/wisski/ingredient/php/server.go b/internal/wisski/ingredient/php/server.go index 6a54fee..efcc31c 100644 --- a/internal/wisski/ingredient/php/server.go +++ b/internal/wisski/ingredient/php/server.go @@ -6,7 +6,7 @@ import ( "github.com/FAU-CDI/wisski-distillery/internal/phpx" "github.com/alessio/shellescape" - "github.com/tkw1536/goprogram/stream" + "github.com/tkw1536/pkglib/stream" ) // NewServer returns a new server that can execute code within this distillery. diff --git a/pkg/execx/execx.go b/pkg/execx/execx.go index c7c347a..5cb8d06 100644 --- a/pkg/execx/execx.go +++ b/pkg/execx/execx.go @@ -9,7 +9,7 @@ import ( "path/filepath" "github.com/rs/zerolog" - "github.com/tkw1536/goprogram/stream" + "github.com/tkw1536/pkglib/stream" ) // CommandError is returned by Exec when a command could not be executed.