You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+23-8
Original file line number
Diff line number
Diff line change
@@ -18,23 +18,33 @@ Languages available as templates:
18
18
19
19
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.
20
20
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
+
21
28
## 1.0 golang-http
22
29
23
30
This template provides additional context and control over the HTTP response from your function.
24
31
25
32
### Status of the template
26
33
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.
28
35
29
-
The template makes use of the OpenFaaS incubator project [of-watchdog](https://github.com/openfaas-incubator/of-watchdog).
This template is also available for armhf / Raspberry Pi via the name `golang-http-armhf`.
47
+
38
48
### Example usage
39
49
40
50
Example writing a successful message:
@@ -140,18 +150,23 @@ This template uses the [http.HandlerFunc](https://golang.org/pkg/net/http/#Handl
140
150
141
151
### Status of the template
142
152
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.
0 commit comments