pulumi/pkg/codegen/go
Brandon Pollack 49dbdbcafa Add the ability to generate aliased import prefixes to go generator.
Previously, if there were nested arguments in schemas, generation of go
code would simply use the go module name, but when imports are generated
they are potentially aliased to avoid naming conflicts.

This is taken into account at the top level since the aliases are
checked directly, but when traversing downward the argument types are generated
after conversions from the PCL schema data.

This fix adds an optional map to pkgContext that contains the go module
info, which contains the appropriate base path to check against aliases.
We also add aliases to the map that are generated by the import system
(and not just from other go package infos).
2024-09-30 17:11:00 +09:00
..
gen_program_test Enable goheader rule and add missing license headers (#15473) 2024-09-09 12:05:45 +00:00
doc.go Enable perfsprint linter (#14813) 2023-12-12 12:19:42 +00:00
doc_test.go sdk/go: Remove 'nolint' directives from package docs 2023-01-06 09:06:47 -08:00
embeddedUtilities.go Support returning plain values from methods (#13592) 2023-11-18 06:02:06 +00:00
gen.go Add the ability to generate aliased import prefixes to go generator. 2024-09-30 17:11:00 +09:00
gen_program.go Add the ability to generate aliased import prefixes to go generator. 2024-09-30 17:11:00 +09:00
gen_program_expression_test.go Enable goheader rule and add missing license headers (#15473) 2024-09-09 12:05:45 +00:00
gen_program_expressions.go Add the ability to generate aliased import prefixes to go generator. 2024-09-30 17:11:00 +09:00
gen_program_inline_invoke.go Enable goheader rule and add missing license headers (#15473) 2024-09-09 12:05:45 +00:00
gen_program_json.go Enable goheader rule and add missing license headers (#15473) 2024-09-09 12:05:45 +00:00
gen_program_optionals.go Enable goheader rule and add missing license headers (#15473) 2024-09-09 12:05:45 +00:00
gen_program_read_dir.go Enable goheader rule and add missing license headers (#15473) 2024-09-09 12:05:45 +00:00
gen_program_splat.go Enable goheader rule and add missing license headers (#15473) 2024-09-09 12:05:45 +00:00
gen_program_ternaries.go Enable goheader rule and add missing license headers (#15473) 2024-09-09 12:05:45 +00:00
gen_program_test.go Enable goheader rule and add missing license headers (#15473) 2024-09-09 12:05:45 +00:00
gen_program_utils.go Enable goheader rule and add missing license headers (#15473) 2024-09-09 12:05:45 +00:00
gen_spill.go Enable goheader rule and add missing license headers (#15473) 2024-09-09 12:05:45 +00:00
gen_test.go Enable goheader rule and add missing license headers (#15473) 2024-09-09 12:05:45 +00:00
importer.go [go/program-gen] Implement importPathPattern in Go language options to override emitted paths in generated Go programs (#16267) 2024-05-30 19:51:12 +00:00
test.go Enable goheader rule and add missing license headers (#15473) 2024-09-09 12:05:45 +00:00
utilities.go Enable perfsprint linter (#14813) 2023-12-12 12:19:42 +00:00
utilities_test.go Enable goheader rule and add missing license headers (#15473) 2024-09-09 12:05:45 +00:00