forked from virtru-dev/cork
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinit.go
More file actions
43 lines (35 loc) · 768 Bytes
/
Copy pathinit.go
File metadata and controls
43 lines (35 loc) · 768 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
package main
import (
"fmt"
"gopkg.in/urfave/cli.v1"
)
func init() {
command := cli.Command{
Name: "init",
Description: "Initialize a project using a specific project type",
Action: cmdInitialize,
Flags: []cli.Flag{
cli.BoolFlag{
Name: "force-pull-image",
Usage: "Forces cork to pull the latest version of the cork container",
EnvVar: "CORK_FORCE_PULL_IMAGE",
},
},
}
registerCommand(command)
}
func cmdInitialize(c *cli.Context) error {
corkType := c.Args().Get(0)
if corkType == "" {
return fmt.Errorf("Must specify corkType")
}
corkDef := &CorkDefinition{
Type: corkType,
}
err := corkDef.LoadName()
if err != nil {
return err
}
fmt.Println("Initialize does not yet do anything")
return nil
}