cmd

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Flags = []cli.Flag{
	&cli.BoolFlag{
		Category:    "Miscellaneous:",
		Name:        "debug",
		Aliases:     []string{"d"},
		Usage:       "Enable debug mode",
		Value:       conf.App.Debug,
		Destination: &conf.App.Debug,
	},
	&cli.BoolFlag{
		Category:    "Miscellaneous:",
		Name:        "silent",
		Aliases:     []string{"s"},
		Usage:       "Suppress log messages from output",
		Value:       conf.App.Silent,
		Destination: &conf.App.Silent,
	},
	&cli.StringFlag{
		Name:        "config",
		Aliases:     []string{"c"},
		Usage:       "Load configuration from file",
		Destination: &conf.App.Config,
	},
	&cli.StringFlag{
		Name:        "bind",
		Aliases:     []string{"b"},
		Usage:       "Address to use",
		Value:       conf.App.Service.Host,
		Destination: &conf.App.Service.Host,
	},
	&cli.IntFlag{
		Name:        "port",
		Aliases:     []string{"p"},
		Usage:       "Port to use",
		Value:       conf.App.Service.Port,
		Destination: &conf.App.Service.Port,
		Action: func(ctx *cli.Context, v int) error {
			if v >= 65536 {
				return fmt.Errorf("flag: port value %v out of range[0-65535]", v)
			}
			return nil
		},
	},
}

Functions

func Action

func Action(ctx *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