generate

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2025 License: Apache-2.0 Imports: 7 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 = files.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