generate

package
v0.3.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GenerateCmd = &cobra.Command{
	Use:   "generate",
	Short: "generate Golang data types from OSCAL schema",
	Long:  "Generate Golang data types from OSCAL Complete schema.",

	RunE: func(cmd *cobra.Command, componentDefinitionPaths []string) error {
		output, err := GenerateCommand(*opts)
		if err != nil {
			return err
		}

		if opts.OutputFile == "" {
			log.Println(string(output))
		} else {
			err = utils.WriteOutput(output, opts.OutputFile)
			if err != nil {
				return fmt.Errorf("failed to write output to file: %s", err)
			}
		}
		return nil
	},
}

Functions

func GenerateCommand

func GenerateCommand(flags generate.BaseFlags) (output []byte, err error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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