diff --git a/packages/schema/bind/src/bindings/golang/wasm/index.ts b/packages/schema/bind/src/bindings/golang/wasm/index.ts index d1a7a96300..44a6c56acc 100644 --- a/packages/schema/bind/src/bindings/golang/wasm/index.ts +++ b/packages/schema/bind/src/bindings/golang/wasm/index.ts @@ -36,6 +36,7 @@ export const generateBinding: GenerateBindingFn = ( }; const output = result.output; const abi = applyTransforms(options.abi); + const goImport = "github.com/testorg/testrepo"; // Generate object type folders if (abi.objectTypes) { @@ -148,7 +149,7 @@ export const generateBinding: GenerateBindingFn = ( name: "types", data: renderTemplates( templatePath("module-type"), - abi.moduleType, + { goImport, ...abi.moduleType }, subTemplates ), }); diff --git a/packages/schema/bind/src/bindings/golang/wasm/templates/imported/module-type/%type%Wrapped-go.mustache b/packages/schema/bind/src/bindings/golang/wasm/templates/imported/module-type/%type%Wrapped-go.mustache index 1340695e91..74b5f3e794 100644 --- a/packages/schema/bind/src/bindings/golang/wasm/templates/imported/module-type/%type%Wrapped-go.mustache +++ b/packages/schema/bind/src/bindings/golang/wasm/templates/imported/module-type/%type%Wrapped-go.mustache @@ -3,7 +3,6 @@ package {{#toSnakeCase}}{{namespace}}{{/toSnakeCase}} {{#methods.length}} import ( "github.com/consideritdone/polywrap-go/polywrap" - "some/library/to/methods" ) {{/methods.length}} diff --git a/packages/schema/bind/src/bindings/golang/wasm/templates/module-type/%type%Wrapped-go.mustache b/packages/schema/bind/src/bindings/golang/wasm/templates/module-type/%type%Wrapped-go.mustache index 3941f19b41..1d85289bdc 100644 --- a/packages/schema/bind/src/bindings/golang/wasm/templates/module-type/%type%Wrapped-go.mustache +++ b/packages/schema/bind/src/bindings/golang/wasm/templates/module-type/%type%Wrapped-go.mustache @@ -3,7 +3,7 @@ package types {{#methods.length}} import ( "github.com/consideritdone/polywrap-go/polywrap" - "some/library/to/methods" + methods "{{goImport}}" ) {{/methods.length}} diff --git a/packages/test-cases/cases/bind/sanity/output/wasm-go/imported/test_import/test_import__module_wrapped.go b/packages/test-cases/cases/bind/sanity/output/wasm-go/imported/test_import/test_import__module_wrapped.go index 9b45b19f55..9273cd4e30 100644 --- a/packages/test-cases/cases/bind/sanity/output/wasm-go/imported/test_import/test_import__module_wrapped.go +++ b/packages/test-cases/cases/bind/sanity/output/wasm-go/imported/test_import/test_import__module_wrapped.go @@ -2,7 +2,6 @@ package test_import import ( "github.com/consideritdone/polywrap-go/polywrap" - "some/library/to/methods" ) func MethodImportedMethod(uri string, args *ArgsImportedMethod) (*TestImport_Object, error) { diff --git a/packages/test-cases/cases/bind/sanity/output/wasm-go/types/module_wrapped.go b/packages/test-cases/cases/bind/sanity/output/wasm-go/types/module_wrapped.go index 089b9e3704..4a0fd678b3 100644 --- a/packages/test-cases/cases/bind/sanity/output/wasm-go/types/module_wrapped.go +++ b/packages/test-cases/cases/bind/sanity/output/wasm-go/types/module_wrapped.go @@ -2,7 +2,7 @@ package types import ( "github.com/consideritdone/polywrap-go/polywrap" - "some/library/to/methods" + methods "github.com/testorg/testrepo" ) func ModuleMethodWrapped(argsBuf []byte, envSize uint32) []byte {