Skip to content

Commit

Permalink
Don't use *schema.Package in go codegen
Browse files Browse the repository at this point in the history
  • Loading branch information
iwahbe committed Dec 8, 2022
1 parent 711a3e9 commit 7ae9c18
Show file tree
Hide file tree
Showing 6 changed files with 165 additions and 90 deletions.
5 changes: 4 additions & 1 deletion pkg/codegen/go/doc.go
Expand Up @@ -26,6 +26,7 @@ import (
"github.com/golang/glog"
"github.com/pulumi/pulumi/pkg/v3/codegen"
"github.com/pulumi/pulumi/pkg/v3/codegen/schema"
"github.com/pulumi/pulumi/sdk/v3/go/common/util/contract"
)

const pulumiSDKVersion = "v3"
Expand Down Expand Up @@ -98,7 +99,9 @@ func (d DocLanguageHelper) GetLanguageTypeString(pkg *schema.Package, moduleName

// GeneratePackagesMap generates a map of Go packages for resources, functions and types.
func (d *DocLanguageHelper) GeneratePackagesMap(pkg *schema.Package, tool string, goInfo GoPackageInfo) {
d.packages = generatePackageContextMap(tool, pkg, goInfo, nil)
var err error
d.packages, err = generatePackageContextMap(tool, pkg.Reference(), goInfo, nil)
contract.AssertNoError(err)
}

// GetPropertyName returns the property name specific to Go.
Expand Down

0 comments on commit 7ae9c18

Please sign in to comment.