Skip to content

Commit dfd03ef

Browse files
committed
marshall indent
1 parent a2e9ca0 commit dfd03ef

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

main.go

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,14 @@ import (
99
"github.com/sqlc-dev/sqlc-go/codegen"
1010
)
1111

12+
type Output struct {
13+
Env []string `json:"env"`
14+
}
15+
1216
func generate(_ context.Context, _ *plugin.CodeGenRequest) (*plugin.CodeGenResponse, error) {
13-
env := os.Environ()
14-
blob, err := json.Marshal(env)
17+
blob, err := json.MarshalIndent(Output{
18+
Env: os.Environ(),
19+
}, "", " ")
1520
if err != nil {
1621
return nil, err
1722
}

0 commit comments

Comments
 (0)