Skip to content

Commit

Permalink
docs: Update go project best practices (#7562)
Browse files Browse the repository at this point in the history
  • Loading branch information
austince committed Apr 27, 2020
1 parent 57fec3f commit f4985f3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions docs/providers/aws/examples/hello-world/go/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Commands

You should also have [go](https://golang.org/doc/install) and [make](https://www.gnu.org/software/make/)

It is always good practice to organize your `go` projects within [GOPATH](https://golang.org/doc/code.html#GOPATH), to maximize the benefits of go tooling.
It is good practice to organize your `go` projects within [GOPATH](https://golang.org/doc/code.html#GOPATH), unless using [Go modules], to maximize the benefits of go tooling.

## 1. Create a service

Expand All @@ -53,7 +53,7 @@ sls create --template aws-go-dep --path myService

#### [aws-go-mod](https://github.com/serverless/serverless/tree/master/lib/plugins/create/templates/aws-go-mod)

`aws-go-mod` uses standard [Go modules](https://github.com/golang/go/wiki/Modules) and requires your project to be **outside** `$GOPATH` and to use Go 1.13+.
`aws-go-mod` uses standard [Go modules] and requires your project to be **outside** `$GOPATH` and to use Go 1.13+.

```
sls create --template aws-go-mod --path myService
Expand Down Expand Up @@ -123,3 +123,5 @@ serverless invoke -f world
```

Congrats you have deployed and ran your Hello World function!

[go modules]: https://github.com/golang/go/wiki/Modules

0 comments on commit f4985f3

Please sign in to comment.