Skip to content
This repository has been archived by the owner on Aug 1, 2024. It is now read-only.

feat: add go workshop #636

Merged
merged 13 commits into from
Aug 29, 2022
Merged

feat: add go workshop #636

merged 13 commits into from
Aug 29, 2022

Conversation

peterwoodworth
Copy link
Contributor

@peterwoodworth peterwoodworth commented Aug 23, 2022

Creates workshop for Go

Still need to add advanced topic sections for testing and pipelines

also fixes #275


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@peterwoodworth peterwoodworth marked this pull request as draft August 23, 2022 01:39
Copy link
Contributor

@RomainMuller RomainMuller left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I stopped reporting at some point, but you'll want to make sure all your main functions start with defer jsii.Close().

If the cdk init template does not have this... we should probably fix that...

code/go/main-workshop/cdk-workshop.go Show resolved Hide resolved
code/go/main-workshop/cdk-workshop_test.go Outdated Show resolved Hide resolved
code/go/main-workshop/cdk-workshop_test.go Outdated Show resolved Hide resolved
code/go/main-workshop/go.mod Outdated Show resolved Hide resolved
code/go/main-workshop/go.mod Outdated Show resolved Hide resolved
workshop/content/60-go/30-hello-cdk/100-cleanup.md Outdated Show resolved Hide resolved
@peterwoodworth
Copy link
Contributor Author

Addressed these comments here and in our templates aws/aws-cdk#21728

mergify bot pushed a commit to aws/aws-cdk that referenced this pull request Aug 24, 2022
These changes were brought up in a [review of the Go workshop](aws-samples/aws-cdk-intro-workshop#636)

- update Go version
- close jsii process
- remove unneeded `assertions` alias

----

### All Submissions:

* [ ] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md)

### Adding new Unconventional Dependencies:

* [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md/#adding-new-unconventional-dependencies)

### New Features

* [ ] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/main/INTEGRATION_TESTS.md)?
	* [ ] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)?

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
@peterwoodworth peterwoodworth marked this pull request as ready for review August 25, 2022 00:52
RomainMuller
RomainMuller previously approved these changes Aug 25, 2022
Copy link
Contributor

@RomainMuller RomainMuller left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Made a bunch of styling adjustments but other than that this was good to go...

Some style fixes... Running `go fmt` and `goimports` to ensure code looks canonical.
Changed branch names from `master` to `main` everywhere.
Fixed a couple of missed edits, etc...

⚠️ This is a PR on top of #636 

---

By submitting this pull request, I confirm that my contribution is made under the terms of the [Apache 2.0 license].

[Apache 2.0 license]: https://www.apache.org/licenses/LICENSE-2.0
RomainMuller
RomainMuller previously approved these changes Aug 26, 2022
Copy link
Contributor

@indrora indrora left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Quality of life things:

  • Across the workshop (not required by this PR!) we should work on wording things a little clearer.
  • I want alt-text. There's 36 spots of it.

Code wise I think there's no major nitpicks except the occasional placement of an interface reference in a struct declaration (which is ignored by the compiler, for various reasons).

I'm going to hold on alt-text though. Doesn't take much but we can port it around for other portions of the workshop.

}

type cdkWorkshopStack struct {
awscdk.Stack
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't really the right place for this? I don't know if this is auto-generated or not but you don't typically place interface declarations inside a struct.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is actually what Romain suggested to me when I was struggling to figure out how to "extend" a "class". The way this works makes sense to me within my limited experience of the language, what would you suggest as an alternative?

workshop/content/60-go/20-create-project/500-deploy.md Outdated Show resolved Hide resolved
workshop/content/60-go/20-create-project/500-deploy.md Outdated Show resolved Hide resolved
workshop/content/60-go/20-create-project/500-deploy.md Outdated Show resolved Hide resolved
@peterwoodworth peterwoodworth merged commit 69597cc into master Aug 29, 2022
@peterwoodworth peterwoodworth deleted the peterwoodworth/goWorkshop branch August 29, 2022 23:39
josephedward pushed a commit to josephedward/aws-cdk that referenced this pull request Aug 30, 2022
These changes were brought up in a [review of the Go workshop](aws-samples/aws-cdk-intro-workshop#636)

- update Go version
- close jsii process
- remove unneeded `assertions` alias

----

### All Submissions:

* [ ] Have you followed the guidelines in our [Contributing guide?](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md)

### Adding new Unconventional Dependencies:

* [ ] This PR adds new unconventional dependencies following the process described [here](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md/#adding-new-unconventional-dependencies)

### New Features

* [ ] Have you added the new feature to an [integration test](https://github.com/aws/aws-cdk/blob/main/INTEGRATION_TESTS.md)?
	* [ ] Did you use `yarn integ` to deploy the infrastructure and generate the snapshot (i.e. `yarn integ` without `--dry-run`)?

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Update CDK Pipelines instructions to use "main" instead of "master" branch
3 participants