logging: Replace functions by native equivalents

This commit is contained in:
Tom Wiesing 2023-03-13 13:19:32 +01:00
parent 4fc937841a
commit d7847b5d69
No known key found for this signature in database
10 changed files with 28 additions and 40 deletions

View file

@ -3,9 +3,9 @@ package instances
import (
"context"
"embed"
"fmt"
"io"
"github.com/FAU-CDI/wisski-distillery/pkg/logging"
"github.com/FAU-CDI/wisski-distillery/pkg/unpack"
"github.com/tkw1536/goprogram/exit"
)
@ -23,7 +23,7 @@ var runtimeResources embed.FS
// Update installs or updates runtime components needed by this component.
func (instances *Instances) Update(ctx context.Context, progress io.Writer) error {
err := unpack.InstallDir(instances.Config.Paths.RuntimeDir(), "runtime", runtimeResources, func(dst, src string) {
logging.ProgressF(progress, ctx, "[copy] %s\n", dst)
fmt.Fprintln(progress, ctx, "[copy] %s\n", dst)
})
if err != nil {
return errBootstrapFailedRuntime.Wrap(err)