cmd

package
v0.6.3 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2022 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Commands = []cli.Command{
	{
		Name:    "init",
		Aliases: []string{"i"},
		Usage:   "init jupiter dependencies",
		Action:  Init,
	},
	{
		Name:    "new",
		Aliases: []string{"n"},
		Usage:   "generate code framework",
		Flags: []cli.Flag{
			cli.StringFlag{
				Name:  "type",
				Usage: "choose template",
				Value: "jupiter-layout",
			},
		},
		Action: func(c *cli.Context) error {
			return New(c)
		},
	},
	{
		Name:    "run",
		Aliases: []string{"r"},
		Usage:   "auto restart program when files changed",
		Action: func(c *cli.Context) error {
			return Run(c)
		},
		Flags: []cli.Flag{
			cli.StringFlag{
				Name:  "c",
				Value: ".jupiter.toml",
				Usage: "指定启动配置文件",
			},
			cli.BoolFlag{
				Name:  "debug",
				Usage: "debug mode",
			},
		},
	},
	{
		Name:    "update",
		Aliases: []string{"upgrade"},
		Usage:   "Upgrade to the latest version",
		Action: func(c *cli.Context) error {
			return Update(c)
		},
	},
	{
		Name:  "clean",
		Usage: "clear all cached",
		Action: func(c *cli.Context) error {
			return Clean(c)
		},
	},
	{
		Name:    "struct2interface",
		Aliases: []string{"struct2interface"},
		Usage:   "Auto generate interface from struct for golang",
		Action: func(c *cli.Context) error {
			return Struct2Interface(c)
		},
		Flags: []cli.Flag{
			cli.StringFlag{
				Name:  "d,dir",
				Usage: "please specify the code path",
				Value: ".",
			},
		},
	},
}

Functions

func Clean added in v0.4.8

func Clean(c *cli.Context) error

Clean 清除所有的缓存

func Init added in v0.6.1

func Init(c *cli.Context) error

func New

func New(c *cli.Context) error

New 生成项目

func Run

func Run(c *cli.Context) error

Run 运行程序

func Struct2Interface added in v0.5.0

func Struct2Interface(c *cli.Context) error

func Update

func Update(c *cli.Context) error

Update 更新到最新版本

Types

This section is empty.

Jump to

Keyboard shortcuts

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