Skip to content

Commit 0a8d236

Browse files
committed
cleanup readme
1 parent 41f8b0f commit 0a8d236

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
[![godoc](https://pkg.go.dev/badge/github.com/coder/preview.svg)](https://pkg.go.dev/github.com/coder/preview)
2424
[![Go Report Card](https://goreportcard.com/badge/github.com/coder/preview)](https://goreportcard.com/report/github.com/coder/preview)
2525
[![OpenSSF Best Practices](https://www.bestpractices.dev/projects/9511/badge)](https://www.bestpractices.dev/projects/9511)
26-
[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/coder/preview/badge)](https://scorecard.dev/viewer/?uri=github.com%2Fcoder%2Fpreview)
2726
[![license](https://img.shields.io/github/license/coder/preview)](./LICENSE)
2827

2928
</div>

preview.go

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,20 @@ type Input struct {
2525
}
2626

2727
type Output struct {
28-
ModuleOutput cty.Value
28+
// ModuleOutput is any 'output' values from the terraform files. This has 0
29+
// effect on the parameters, tags, etc. It can be helpful for debugging, as it
30+
// allows exporting some terraform values to the caller to review.
31+
ModuleOutput cty.Value
32+
2933
Parameters []types.Parameter
3034
WorkspaceTags types.TagBlocks
31-
Files map[string]*hcl.File
35+
// Files is included for printing diagnostics.
36+
// TODO: Is the memory impact of this too much? Should we render diagnostic source code
37+
// into the diagnostics up front? and remove this?
38+
Files map[string]*hcl.File
3239
}
3340

34-
func Preview(ctx context.Context, input Input, dir fs.FS) (mainOutput *Output, diagnostics hcl.Diagnostics) {
41+
func Preview(ctx context.Context, input Input, dir fs.FS) (output *Output, diagnostics hcl.Diagnostics) {
3542
// The trivy package works with `github.com/zclconf/go-cty`. This package is
3643
// similar to `reflect` in its usage. This package can panic if types are
3744
// misused. To protect the caller, a general `recover` is used to catch any

0 commit comments

Comments
 (0)