root

package
v1.58.8 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2026 License: MPL-2.0 Imports: 4 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Verbosity int

	// TraceFile is the file to write trace logs to.
	// If nil (the default), trace logs are not written.
	TraceFile *string
)
View Source
var Cmd = &cobra.Command{
	Use:           "encore",
	Short:         "encore is the fastest way of developing backend applications",
	SilenceErrors: true,
	CompletionOptions: cobra.CompletionOptions{
		HiddenDefaultCmd: true,
	},
	PersistentPreRun: func(cmd *cobra.Command, args []string) {
		if traceFile != "" {
			TraceFile = &traceFile
		}

		level := zerolog.InfoLevel
		if Verbosity == 1 {
			level = zerolog.DebugLevel
		} else if Verbosity >= 2 {
			level = zerolog.TraceLevel
		}

		if Verbosity >= 1 {
			errlist.Verbose = true
		}
		log.Logger = log.Logger.Level(level)

		for _, f := range preRuns {
			f(cmd, args)
		}
	},
}

Functions

func AddPreRun added in v1.38.0

func AddPreRun(f func(cmd *cobra.Command, args []string))

AddPreRun adds a function to be executed before the command runs.

Types

This section is empty.

Jump to

Keyboard shortcuts

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