Move run to own package

This commit is contained in:
Djordje Lukic 2020-05-04 10:28:42 +02:00
parent 7046fc8ac5
commit eee9bf449f
3 changed files with 7 additions and 5 deletions

View File

@ -1,4 +1,4 @@
package cmd
package run
import (
"strconv"

View File

@ -25,17 +25,18 @@
THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
package cmd
package run
import (
"context"
"github.com/docker/api/client"
"github.com/google/uuid"
"github.com/spf13/cobra"
"github.com/docker/api/client"
)
func RunCommand() *cobra.Command {
func Command() *cobra.Command {
var opts runOpts
cmd := &cobra.Command{
Use: "run",

View File

@ -44,6 +44,7 @@ import (
"github.com/spf13/cobra"
"github.com/docker/api/cli/cmd"
"github.com/docker/api/cli/cmd/run"
apicontext "github.com/docker/api/context"
"github.com/docker/api/context/store"
"github.com/docker/api/util"
@ -98,7 +99,7 @@ func main() {
&cmd.PsCommand,
cmd.ServeCommand(),
&cmd.ExampleCommand,
cmd.RunCommand(),
run.Command(),
)
helpFunc := root.HelpFunc()