cmd

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2021 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Add = cli.Command{
	Name:    "add",
	Aliases: []string{"a"},
	Usage:   "Add a package",
	Flags: []cli.Flag{
		&cli.BoolFlag{
			Name:        "force",
			Aliases:     []string{"f"},
			Usage:       "Overwrite existing package without prompt",
			Destination: &flags.Force,
		},
		&cli.BoolFlag{
			Name:        "local",
			Aliases:     []string{"l"},
			Usage:       "local mode",
			Destination: &flags.Local,
		},
	},
	Before: localOrToken,
	Action: doAdd,
}
View Source
var Remove = cli.Command{
	Name:    "remove",
	Aliases: []string{"rm"},
	Usage:   "Remove package(s)",
	Before:  localOrToken,
	Action:  doRemove,
}
View Source
var Server = cli.Command{
	Name:    "server",
	Aliases: []string{"web"},
	Usage:   "Start the vanity server",
	Flags: []cli.Flag{
		&cli.IntFlag{
			Name:        "port",
			Aliases:     []string{"p"},
			Usage:       "Port to run the vanity server on",
			Value:       3333,
			EnvVars:     []string{"VANITY_PORT"},
			Destination: &flags.Port,
		},
		&cli.StringFlag{
			Name:        "domain",
			Aliases:     []string{"d"},
			Usage:       "The Go module domain (e.g. go.jolheiser.com)",
			EnvVars:     []string{"VANITY_DOMAIN"},
			Destination: &flags.Domain,
		},
	},
	Action: doServer,
}
View Source
var Update = cli.Command{
	Name:    "update",
	Aliases: []string{"u"},
	Usage:   "Update a package",
	Flags: []cli.Flag{
		&cli.BoolFlag{
			Name:        "local",
			Aliases:     []string{"l"},
			Usage:       "local mode",
			Destination: &flags.Local,
		},
	},
	Before: localOrToken,
	Action: doUpdate,
}

Functions

func New

func New() *cli.App

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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