Skip to content

Commit c495532

Browse files
authored
Update README.md
1 parent b8f05d7 commit c495532

File tree

1 file changed

+23
-8
lines changed

1 file changed

+23
-8
lines changed

README.md

+23-8
Original file line numberDiff line numberDiff line change
@@ -18,23 +18,33 @@ Languages available as templates:
1818
1919
The two templates are equivalent with `golang-http` using a structured request/response object and the alternative implementing a Golang `http.HandleFunc` from the Golang stdlib. `golang-http` is more "conventional" for a Golang serverless template but this is a question of style/taste.
2020

21+
## Dependencies
22+
23+
You can manage dependencies in one of the following ways:
24+
25+
* To use Go modules without vendoring, add `--build-arg GO111MODULE=on` to `faas-cli up`, you can also use `--build-arg GOPROXY=https://` if you want to use your own mirror for the modules
26+
* For traditional vendoring with `dep` give no argument, or add `--build-arg GO111MODULE=off` to `faas-cli up`
27+
2128
## 1.0 golang-http
2229

2330
This template provides additional context and control over the HTTP response from your function.
2431

2532
### Status of the template
2633

27-
This template is pre-release and is likely to change - please provide feedback via https://github.com/openfaas/faas
34+
This template is the most performant and recent Golang template for OpenFaaS which also provides a function-style request and response for the user.
2835

29-
The template makes use of the OpenFaaS incubator project [of-watchdog](https://github.com/openfaas-incubator/of-watchdog).
36+
### Get the template
3037

31-
### Trying the template
38+
```sh
39+
$ faas template store pull golang-http
3240

33-
```
41+
# Or
3442
$ faas template pull https://github.com/openfaas-incubator/golang-http-template
3543
$ faas new --lang golang-http <fn-name>
3644
```
3745

46+
This template is also available for armhf / Raspberry Pi via the name `golang-http-armhf`.
47+
3848
### Example usage
3949

4050
Example writing a successful message:
@@ -140,18 +150,23 @@ This template uses the [http.HandlerFunc](https://golang.org/pkg/net/http/#Handl
140150

141151
### Status of the template
142152

143-
The template makes use of the OpenFaaS incubator project [of-watchdog](https://github.com/openfaas-incubator/of-watchdog).
153+
Like the golang-http template, this is one of the fastest templates available, but takes a more service-orientated approach to its signature. Instead of looking like a traditional function, the user has complete control over the HTTP request and response.
144154

145-
### Trying the template
155+
### Get the template
146156

147157
```
148-
$ faas template pull https://github.com/openfaas-incubator/golang-http-template
158+
$ faas template store pull golang-middleware
159+
160+
# Or
161+
$ faas template pull https://github.com/openfaas-incubator/golang-middleware-template
149162
$ faas new --lang golang-middleware <fn-name>
150163
```
151164

165+
This template is also available for armhf / Raspberry Pi via the name `golang-middleware-armhf`.
166+
152167
### Example usage
153168

154-
Example writing a json response:
169+
Example writing a JSON response:
155170

156171
```go
157172
package function

0 commit comments

Comments
 (0)