mirror of
https://github.com/docker/compose.git
synced 2026-08-31 06:49:15 +00:00
Add comments on exported items, remove example command
Also add `make lint` to run the linter
This commit is contained in:
parent
29737c2a23
commit
24c035e822
26 changed files with 136 additions and 196 deletions
|
|
@ -2,6 +2,7 @@ package cmd
|
|||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
"io"
|
||||
"os"
|
||||
"strings"
|
||||
|
|
@ -17,6 +18,7 @@ type execOpts struct {
|
|||
Tty bool
|
||||
}
|
||||
|
||||
// ExecCommand runs a command in a running container
|
||||
func ExecCommand() *cobra.Command {
|
||||
var opts execOpts
|
||||
cmd := &cobra.Command{
|
||||
|
|
@ -52,7 +54,9 @@ func runExec(ctx context.Context, opts execOpts, name string, command string) er
|
|||
return err
|
||||
}
|
||||
defer func() {
|
||||
con.Reset()
|
||||
if err := con.Reset(); err != nil {
|
||||
fmt.Println("Unable to close the console")
|
||||
}
|
||||
}()
|
||||
|
||||
stdout = con
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue