Skip to content

Commit 79cb8b5

Browse files
authored
fix(wasm): Move Runner struct to shared file (#2725)
1 parent 79c58b7 commit 79cb8b5

File tree

3 files changed

+8
-12
lines changed

3 files changed

+8
-12
lines changed

internal/ext/wasm/nowasm.go

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,12 @@
33
package wasm
44

55
import (
6-
"fmt"
76
"context"
7+
"fmt"
88

99
"github.com/sqlc-dev/sqlc/internal/plugin"
1010
)
1111

12-
type Runner struct {
13-
URL string
14-
SHA256 string
15-
}
16-
1712
func (r *Runner) Generate(ctx context.Context, req *plugin.CodeGenRequest) (*plugin.CodeGenResponse, error) {
1813
return nil, fmt.Errorf("sqlc built without wasmtime support")
1914
}

internal/ext/wasm/runner.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
package wasm
2+
3+
type Runner struct {
4+
URL string
5+
SHA256 string
6+
Env []string
7+
}

internal/ext/wasm/wasm.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,6 @@ func cacheDir() (string, error) {
4444
return filepath.Join(cacheHome, "sqlc"), nil
4545
}
4646

47-
type Runner struct {
48-
URL string
49-
SHA256 string
50-
Env []string
51-
}
52-
5347
var flight singleflight.Group
5448

5549
// Verify the provided sha256 is valid.

0 commit comments

Comments
 (0)