Skip to content

Commit 8bb365f

Browse files
committed
Remove verbose statement
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <[email protected]>
1 parent 1332cab commit 8bb365f

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,9 @@ func Echo(w http.ResponseWriter, r *http.Request) {
327327

328328
To include a relative module such as this new `handlers` package, you should create a `GO_REPLACE.txt` file as follows.
329329

330-
Let's say your GOPATH for your GitHub repo is: `github.com/alexellis/vault/` and your function is called `purchase`, this makes a total path of: `github.com/alexellis/vault/purchase/`
330+
Let's say your GOPATH for your GitHub repo is: `github.com/alexellis/vault/` and your OpenFaaS function is `purchase` generated by `faas-cli new purchase --lang golang-middleware`.
331+
332+
Your relative GOPATH is: `github.com/alexellis/vault/purchase`, so add a redirect as per below to redirect the "handlers" package to where it exists in the build container.
331333

332334
```
333335
replace github.com/alexellis/vault/purchase/handlers => ./function/handlers

template/golang-middleware/Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ RUN mkdir -p /go/src/handler
1212
WORKDIR /go/src/handler
1313
COPY . .
1414

15-
RUN $(cat function/GO_REPLACE.txt >> ./go.mod || exit 0) && cat go.mod
15+
# Add user overrides to the root go.mod, which is the only place "replace" can be used
16+
RUN cat function/GO_REPLACE.txt >> ./go.mod || exit 0
1617

1718
# Run a gofmt and exclude all vendored code.
1819
RUN test -z "$(gofmt -l $(find . -type f -name '*.go' -not -path "./vendor/*" -not -path "./function/vendor/*"))" || { echo "Run \"gofmt -s -w\" on your Golang code"; exit 1; }

0 commit comments

Comments
 (0)