New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add aws-go-mod #5393

Merged
merged 10 commits into from Oct 14, 2018

Conversation

Projects
None yet
3 participants
@toshi0607
Copy link
Contributor

toshi0607 commented Oct 13, 2018

What did you implement:

Closes #XXXXX
no issues

In Go1.11, new package management system modules is introduced. In this PR, I'd like to add AWS template of Go using modules as well as dep one.

How did you implement it:

I added template, list of template and tests.

How can we verify it:

# Go 1.11 is necessary
# $GOPATH should be set

$ cd $GOPATH/src/github.com/[your repo]
$ serverless create -t aws-go-modules -p sample-app
$ cd sample-app
$ make build

# go.sum will be generated and no error will be occurred

Todos:

  • Write tests
  • Write documentation
  • Fix linting errors
  • Make sure code coverage hasn't dropped
  • Provide verification config / commands / resources
  • Enable "Allow edits from maintainers" for this PR
  • Update the messages below

Is this ready for review?: YES
Is it a breaking change?: NO

toshi0607 added some commits Oct 13, 2018

@toshi0607 toshi0607 changed the title [WIP] add aws-go-mod add aws-go-mod Oct 13, 2018

toshi0607 added some commits Oct 13, 2018

@horike37 horike37 added this to the 1.33.0 milestone Oct 13, 2018

@sebito91
Copy link
Member

sebito91 left a comment

This is a great contribution, thanks for helping to keep us up to date! Can you please rename to aws-go-mod just to keep with the trend of the other elements?

image: golang:1.11
volumes:
- ./tmp/serverless-integration-test-aws-go-dep:/app
- ./tmp/serverless-integration-test-aws-go-dep:/go/src/app

This comment has been minimized.

@sebito91

sebito91 Oct 13, 2018

Member

Also we should update these paths to ./tmp/serverless-integration-test-aws-go-mod...

@@ -65,6 +65,9 @@ Most commonly used templates:
- aws-scala-sbt
- aws-csharp
- aws-fsharp
- aws-go
- aws-go-dep
- aws-go-modules

This comment has been minimized.

@sebito91

sebito91 Oct 13, 2018

Member

Rename to aws-go-mod please!

env GOOS=linux go build -ldflags="-s -w" -o bin/hello hello/main.go
env GOOS=linux go build -ldflags="-s -w" -o bin/world world/main.go

.PHONY: clean

This comment has been minimized.

@sebito91

sebito91 Oct 13, 2018

Member

Just like your other PR #5389 let's please move the .PHONY to a single line.

toshi0607 added some commits Oct 14, 2018

@sebito91
Copy link
Member

sebito91 left a comment

Excellent, thank you for the contributions!

@sebito91 sebito91 merged commit ae8f9da into serverless:master Oct 14, 2018

3 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage remained the same at 91.093%
Details
@toshi0607

This comment has been minimized.

Copy link
Contributor

toshi0607 commented Oct 14, 2018

Thank you for your review and merging 🎉

@toshi0607 toshi0607 deleted the toshi0607:add-go-modules-template branch Oct 14, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment