mirror of https://github.com/docker/cli.git
e2e/cli-plugins: explicitly ignore fmt.Printxx errors
To keep some linters happier, and my IDE to be less noisy. Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
parent
5e7948ec83
commit
e9f32edac5
|
@ -39,18 +39,18 @@ func RootCmd(dockerCli command.Cli) *cobra.Command {
|
|||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
go func() {
|
||||
<-cmd.Context().Done()
|
||||
fmt.Fprintln(dockerCli.Out(), "context cancelled")
|
||||
_, _ = fmt.Fprintln(dockerCli.Out(), "context cancelled")
|
||||
os.Exit(2)
|
||||
}()
|
||||
signalCh := make(chan os.Signal, 10)
|
||||
signal.Notify(signalCh, syscall.SIGINT, syscall.SIGTERM)
|
||||
go func() {
|
||||
for range signalCh {
|
||||
fmt.Fprintln(dockerCli.Out(), "received SIGINT")
|
||||
_, _ = fmt.Fprintln(dockerCli.Out(), "received SIGINT")
|
||||
}
|
||||
}()
|
||||
<-time.After(3 * time.Second)
|
||||
fmt.Fprintln(dockerCli.Err(), "exit after 3 seconds")
|
||||
_, _ = fmt.Fprintln(dockerCli.Err(), "exit after 3 seconds")
|
||||
return nil
|
||||
},
|
||||
})
|
||||
|
@ -64,18 +64,18 @@ func RootCmd(dockerCli command.Cli) *cobra.Command {
|
|||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
go func() {
|
||||
<-cmd.Context().Done()
|
||||
fmt.Fprintln(dockerCli.Out(), "context cancelled")
|
||||
_, _ = fmt.Fprintln(dockerCli.Out(), "context cancelled")
|
||||
os.Exit(2)
|
||||
}()
|
||||
signalCh := make(chan os.Signal, 10)
|
||||
signal.Notify(signalCh, syscall.SIGINT, syscall.SIGTERM)
|
||||
go func() {
|
||||
for range signalCh {
|
||||
fmt.Fprintln(dockerCli.Out(), "received SIGINT")
|
||||
_, _ = fmt.Fprintln(dockerCli.Out(), "received SIGINT")
|
||||
}
|
||||
}()
|
||||
<-time.After(3 * time.Second)
|
||||
fmt.Fprintln(dockerCli.Err(), "exit after 3 seconds")
|
||||
_, _ = fmt.Fprintln(dockerCli.Err(), "exit after 3 seconds")
|
||||
return nil
|
||||
},
|
||||
})
|
||||
|
@ -91,11 +91,11 @@ func RootCmd(dockerCli command.Cli) *cobra.Command {
|
|||
signal.Notify(signalCh, syscall.SIGINT, syscall.SIGTERM)
|
||||
go func() {
|
||||
for range signalCh {
|
||||
fmt.Fprintln(dockerCli.Out(), "received SIGINT")
|
||||
_, _ = fmt.Fprintln(dockerCli.Out(), "received SIGINT")
|
||||
}
|
||||
}()
|
||||
<-time.After(3 * time.Second)
|
||||
fmt.Fprintln(dockerCli.Err(), "exit after 3 seconds")
|
||||
_, _ = fmt.Fprintln(dockerCli.Err(), "exit after 3 seconds")
|
||||
return nil
|
||||
},
|
||||
})
|
||||
|
@ -113,7 +113,7 @@ func RootCmd(dockerCli command.Cli) *cobra.Command {
|
|||
select {
|
||||
case <-done:
|
||||
case <-time.After(2 * time.Second):
|
||||
fmt.Fprint(dockerCli.Err(), "timeout after 2 seconds")
|
||||
_, _ = fmt.Fprint(dockerCli.Err(), "timeout after 2 seconds")
|
||||
}
|
||||
return nil
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue