Merge pull request #2220 from stevvooe/redundant-pkg-name

cmd/ctr/app: remove redundant package name
This commit is contained in:
Kenfe-Mickaël Laventure 2018-03-22 13:23:50 -07:00 committed by GitHub
commit 07dfb0368a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 6 deletions

View File

@ -14,7 +14,7 @@
limitations under the License. limitations under the License.
*/ */
package command package app
import ( import (
"fmt" "fmt"
@ -51,8 +51,8 @@ func init() {
} }
} }
// App returns a *cli.App instance. // New returns a *cli.App instance.
func App() *cli.App { func New() *cli.App {
app := cli.NewApp() app := cli.NewApp()
app.Name = "ctr" app.Name = "ctr"
app.Version = version.Version app.Version = version.Version

View File

@ -16,7 +16,7 @@
limitations under the License. limitations under the License.
*/ */
package command package app
import "github.com/containerd/containerd/cmd/ctr/commands/shim" import "github.com/containerd/containerd/cmd/ctr/commands/shim"

View File

@ -20,14 +20,14 @@ import (
"fmt" "fmt"
"os" "os"
"github.com/containerd/containerd/cmd/ctr/command" "github.com/containerd/containerd/cmd/ctr/app"
"github.com/urfave/cli" "github.com/urfave/cli"
) )
var pluginCmds = []cli.Command{} var pluginCmds = []cli.Command{}
func main() { func main() {
app := command.App() app := app.New()
app.Commands = append(app.Commands, pluginCmds...) app.Commands = append(app.Commands, pluginCmds...)
if err := app.Run(os.Args); err != nil { if err := app.Run(os.Args); err != nil {
fmt.Fprintf(os.Stderr, "ctr: %s\n", err) fmt.Fprintf(os.Stderr, "ctr: %s\n", err)