// GenTemplate creates a template for use with single time ingestion / manual reset
GenTemplate creates a template for use with single time ingestion / manual reset
// GenTemplate creates a template for use with single time ingestion / manual reset
func GenTemplate(tags []string, Age time.Duration, tplate string) error {
	creds := "-U https://%Host/sdk -u %windowsuser -p %windowspassword"
	d := NewDeviceTemplate(Age, strings.Join(tags, ","))
	ch1 := fmt.Sprintf("metascan %v --snapAge %v --tags %v", creds, Age, strings.Join(tags, ","))
	ch := newCreate("metascan", ch1, strings.Join(tags, ","), "300")
	err := d.add(ch)
	if err != nil {
		return fmt.Errorf("failed to add check %v", err)
	}
	err = d.save(tplate)
	if err != nil {
		return fmt.Errorf("failed to save file %v", err)
	}
	return nil
}
func GenTemplate ( tags [ ] string , Age time . Duration , tplate string ) error { creds := " " d := NewDeviceTemplate ( Age , strings . Join ( tags , " " ) ) ch1 := fmt . Sprintf ( " " , creds , Age , strings . Join ( tags , " " ) ) ch := newCreate ( " " , ch1 , strings . Join ( tags , " " ) , " " ) err := d . add ( ch ) if err != nil { return fmt . Errorf ( " " , err ) } err = d . save ( tplate ) if err != nil { return fmt . Errorf ( " " , err ) } return nil }
GenTemplate creates a template for use with single time ingestion / manual reset
GenTemplate creates a template for use with single time ingestion / manual reset
//fmt.Println(basetemplate) // save to disk