We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a2e9ca0 commit dfd03efCopy full SHA for dfd03ef
main.go
@@ -9,9 +9,14 @@ import (
9
"github.com/sqlc-dev/sqlc-go/codegen"
10
)
11
12
+type Output struct {
13
+ Env []string `json:"env"`
14
+}
15
+
16
func generate(_ context.Context, _ *plugin.CodeGenRequest) (*plugin.CodeGenResponse, error) {
- env := os.Environ()
- blob, err := json.Marshal(env)
17
+ blob, err := json.MarshalIndent(Output{
18
+ Env: os.Environ(),
19
+ }, "", " ")
20
if err != nil {
21
return nil, err
22
}
0 commit comments