// Validate validates build command.
Validate validates build command.
// Validate validates build command .
func (o *Options) Validate(args []string) (err error) {
	if len(args) > 1 {
		return errors.New(
			"specify one path to " + pgmconfig.KustomizationFileNames[0])
	}
	if len(args) == 0 {
		o.kustomizationPath = loader.CWD
	} else {
		o.kustomizationPath = args[0]
	}
	o.loadRestrictor, err = loader.ValidateFlagLoadRestrictor()
	if err != nil {
		return err
	}
	o.outOrder, err = validateFlagReorderOutput()
	return
}
func ( o * Options ) Validate ( args [ ] string ) ( err error ) { if len ( args ) > 1 { return errors . New ( " " + pgmconfig . KustomizationFileNames [ 0 ] ) } if len ( args ) == 0 { o . kustomizationPath = loader . CWD } else { o . kustomizationPath = args [ 0 ] } o . loadRestrictor , err = loader . ValidateFlagLoadRestrictor ( ) if err != nil { return err } o . outOrder , err = validateFlagReorderOutput ( ) return }
Validate validates build command.
Validate validates build command .