Files
steampipe/pkg/export/target.go
Binaek Sarkar 269a74b945 Tweaks to export behaviour in 'check'. Closes #3777
Named exports now combined into a single export. Closes #3773
Do not create export files for Cancelled control runs. Closes #3578
check export should not be silent.  Closes #3577
2023-09-22 17:57:38 +01:00

24 lines
420 B
Go

package export
import (
"context"
"fmt"
"os"
)
type Target struct {
exporter Exporter
filePath string
isNamedTarget bool
}
func (t *Target) Export(ctx context.Context, input ExportSourceData) (string, error) {
err := t.exporter.Export(ctx, input, t.filePath)
if err != nil {
return "", err
} else {
pwd, _ := os.Getwd()
return fmt.Sprintf("File exported to %s/%s", pwd, t.filePath), nil
}
}