Skip to content
This repository was archived by the owner on Jul 18, 2025. It is now read-only.

Commit f103660

Browse files
author
Jean-Christophe Sirot
committed
Replace remaining Printf and Println by their Fprint* counterparts
Signed-off-by: Jean-Christophe Sirot <[email protected]>
1 parent 73d8674 commit f103660

File tree

6 files changed

+7
-6
lines changed

6 files changed

+7
-6
lines changed

internal/commands/install.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,6 @@ func runInstall(dockerCli command.Cli, appname string, opts installOptions) erro
142142
return err2
143143
}
144144

145-
fmt.Printf("Application %q installed on context %q\n", installationName, opts.targetContext)
145+
fmt.Fprintf(os.Stdout, "Application %q installed on context %q\n", installationName, opts.targetContext)
146146
return nil
147147
}

internal/commands/pull.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ package commands
22

33
import (
44
"fmt"
5+
"os"
56

67
"github.com/docker/app/internal/store"
78
"github.com/docker/cli/cli"
@@ -46,7 +47,7 @@ func runPull(dockerCli command.Cli, name string, opts registryOptions) error {
4647
return errors.Wrap(err, name)
4748
}
4849

49-
fmt.Printf("Successfully pulled %q (%s) from %s\n", bndl.Name, bndl.Version, ref.String())
50+
fmt.Fprintf(os.Stdout, "Successfully pulled %q (%s) from %s\n", bndl.Name, bndl.Version, ref.String())
5051

5152
return nil
5253
}

internal/commands/push.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ func runPush(dockerCli command.Cli, name string, opts pushOptions) error {
118118
if err != nil {
119119
return errors.Wrapf(err, "pushing to %q", retag.cnabRef)
120120
}
121-
fmt.Printf("Successfully pushed bundle to %s. Digest is %s.\n", retag.cnabRef.String(), descriptor.Digest)
121+
fmt.Fprintf(os.Stdout, "Successfully pushed bundle to %s. Digest is %s.\n", retag.cnabRef.String(), descriptor.Digest)
122122
return nil
123123
}
124124

internal/commands/uninstall.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,6 @@ func runUninstall(dockerCli command.Cli, installationName string, opts uninstall
8686
if err := installationStore.Delete(installationName); err != nil {
8787
return fmt.Errorf("Failed to delete installation %q from the installation store: %s", installationName, err)
8888
}
89-
fmt.Printf("Application %q uninstalled on context %q\n", installationName, opts.targetContext)
89+
fmt.Fprintf(os.Stdout, "Application %q uninstalled on context %q\n", installationName, opts.targetContext)
9090
return nil
9191
}

internal/commands/upgrade.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,6 @@ func runUpgrade(dockerCli command.Cli, installationName string, opts upgradeOpti
9797
if err2 != nil {
9898
return err2
9999
}
100-
fmt.Printf("Application %q upgraded on context %q\n", installationName, opts.targetContext)
100+
fmt.Fprintf(os.Stdout, "Application %q upgraded on context %q\n", installationName, opts.targetContext)
101101
return nil
102102
}

internal/packager/init.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ func initFromComposeFile(name string, composeFile string) error {
181181
return errors.Wrap(err, "failed to write parameters.yml")
182182
}
183183
if needsFilling {
184-
fmt.Println("You will need to edit parameters.yml to fill in default values.")
184+
fmt.Fprintln(os.Stderr, "You will need to edit parameters.yml to fill in default values.")
185185
}
186186
return nil
187187
}

0 commit comments

Comments
 (0)