Join Slack
Powered by
I’m interested in how to create reusable packages ...
# golang
c
cuddly-dusk-95227
09/01/2020, 9:29 AM
I’m interested in how to create reusable packages for golang projects. Does anyone have any examples on what they think the best way to create higher-level abstractions? My gut feel is to create a type to define the inputs, and use a
New()
helper to take in providers and contexts.
l
lemon-agent-27707
09/01/2020, 3:08 PM
Pulumi has component resources which are designed for this. We have a few different examples of implementing this pattern:
https://github.com/pulumi/examples/tree/master/azure-go-webserver-component
https://github.com/pulumi/examples/tree/master/aws-go-s3-folder-component
Docs
https://www.pulumi.com/docs/intro/concepts/programming-model/#components
❤️ 1
c
cuddly-dusk-95227
09/01/2020, 10:27 PM
Ahh! Thanks! I didn’t know about components. Will need to do some research :)
3
Views
Open in Slack
Previous
Next