generate

package
Version: v0.0.0-...-f290db4 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2017 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	RootCmd = &cobra.Command{
		Use:   "kube-client-gen",
		Short: "Kubernetes Client Generator",
		PersistentPreRun: func(cmd *cobra.Command, args []string) {
			logger := log.Log

			logger.SetHandler(log15.CallerFileHandler(log15.StderrHandler))

			logLvl := defaultLogLevel
			if *verbose {
				logLvl = log15.LvlDebug
			}
			logger.SetHandler(log15.LvlFilterHandler(logLvl, log.Log.GetHandler()))

			config = generator.Config{
				Logger:          logger,
				Force:           *force,
				OutputDirectory: *outputDirectory,
			}

			ldr := loader.New(*packages, logger)
			pkgs, err := ldr.Load()
			if err != nil {
				logger.Error("failed to parse packages", "error", err)
				os.Exit(1)
			}
			parsedPackages = pkgs
		},
	}
)

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL