cmd

package
v1.15.0 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const Version = "1.4.0"

Variables

View Source
var ErrConfigNotExist = errors.New("no config file was found")

ErrConfigNotExist is returned when a configuration file cannot be found.

View Source
var RootCmd = &cobra.Command{
	Use:   "refresh",
	Short: "Refresh is a command line tool that builds and (re)starts your Go application everytime you save a Go or template file.",
	PersistentPreRun: func(cmd *cobra.Command, args []string) {
		log.SetLevel(logLevel(verbosity))
		h := loghandler.New(os.Stderr)
		h.Prefix = "⎯⎯⎯⎯⎯⎯ ⚡️refresh ⎯⎯⎯⎯⎯ "
		log.SetHandler(h)

		buildInfo, ok := dbg.ReadBuildInfo()
		if ok {
			log.Debugf("Version %s", buildInfo.Main.Version)
		}
	},
	RunE: func(cmd *cobra.Command, args []string) error {
		return Run(cfgFile)
	},
}

Functions

func Execute

func Execute()

func Run

func Run(cfgFile string) error

func RunWithContext

func RunWithContext(cfgFile string, ctx context.Context) error

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