host

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Command = &cli.Command{
		Name:    "localhost",
		Usage:   "host 文件操作",
		Aliases: []string{"l"},
		Flags: []cli.Flag{
			&cli.StringFlag{
				Name:     "domain",
				Aliases:  []string{"d"},
				Usage:    "域名",
				Required: true,
				Action: func(context *cli.Context, s string) error {
					_, err := url.Parse(s)
					if err != nil {
						return errors.New(fmt.Sprintf("domain %s 解析失败,请重新输入", s))
					}
					return nil
				},
			},
		},
		Action: Action,
	}
)

Functions

func Action

func Action(c *cli.Context) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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