bundle

package
v0.1.12 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Cmd = &cobra.Command{
	Use:   "bundle",
	Short: "Generate a bundle from a template",
	Long:  Usage(),
	RunE: func(cmd *cobra.Command, args []string) error {
		if strings.TrimSpace(string(cFlags.OutputFile)) == "" && dryRun.IsUnset() {
			return errors.New("required flag(s) \"output\" not set")
		}

		err := render.RenderBundle(cFlags, bool(validate), dryRun.Value)
		if errs, ok := err.(v1.ValidationErrors); ok {
			for i := 0; i < len(errs.Errors) && i < 10; i++ {
				_, _ = fmt.Fprintf(os.Stderr, "error: %s\n", errs.Errors[i].Error())
			}
			os.Exit(1)
		}

		return err
	},
}

Functions

func Usage

func Usage() string

Types

This section is empty.

Jump to

Keyboard shortcuts

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