cmd

package
v0.0.0-...-403b093 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 12, 2018 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Config = cli.Command{
		Name:  "config",
		Usage: "set registry or token",
		Flags: []cli.Flag{
			cli.StringFlag{
				Name:  "token",
				Usage: "config token",
			},
			cli.StringFlag{
				Name:  "registry",
				Usage: "config registry",
			},
		},
		Action: func(c *cli.Context) (err error) {
			for name, f := range map[string]func(string) (string, error){
				"token":    conf.Token,
				"registry": conf.Registry,
			} {
				val := c.String(name)
				if val == "" {
					continue
				}

				_, err = f(val)
				if err != nil {
					return
				}
			}
			return
		},
	}
)
View Source
var (
	Get = cli.Command{
		Name:  "get",
		Usage: "fetch package",
		Flags: []cli.Flag{
			cli.BoolFlag{
				Name:  "l",
				Usage: "local verdor",
			},
			cli.BoolFlag{
				Name:  "u",
				Usage: "update dependencies",
			},
			cli.BoolFlag{
				Name:  "v",
				Usage: "verbose progress",
			},
		},
		Action: func(c *cli.Context) error {
			return fetchPackages(c.Args(), c.Bool("l"), c.Bool("u"), c.Bool("v"))
		},
	}
)
View Source
var (
	Mirror = cli.Command{
		Name:  "mirror",
		Usage: "forwarding package",
		Subcommands: []cli.Command{
			cmdSet, cmdGet, cmdDel,
		},
	}
)

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL