Add comments on exported items, remove example command

Also add `make lint` to run the linter
This commit is contained in:
Djordje Lukic 2020-05-04 23:00:21 +02:00 committed by Djordje Lukic
parent 29737c2a23
commit 24c035e822
26 changed files with 136 additions and 196 deletions

View file

@ -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