mirror of
https://github.com/turbot/steampipe.git
synced 2025-12-20 02:20:57 -05:00
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
24 lines
420 B
Go
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
|
|
}
|
|
}
|