Skip to content
This repository was archived by the owner on Dec 11, 2023. It is now read-only.

Commit 3083763

Browse files
committed
clarify the go example a bit
1 parent 8c24261 commit 3083763

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

README.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -110,10 +110,18 @@ curl http://node-lambda.default.dev.triggermesh.io --data '{"name": "Foo"}'
110110

111111
1. Prepare function code
112112

113+
You will create a `main.go` file in the `example-lambda-go` directory.
114+
115+
Create the directory and get into it:
116+
113117
```
114118
mkdir example-lambda-go
115119
cd example-lambda-go
116-
cat > main.go <<EOF
120+
```
121+
122+
Copy and Paste the following into a `main.go` file:
123+
124+
```
117125
package main
118126
119127
import (
@@ -123,7 +131,7 @@ import (
123131
)
124132
125133
type MyEvent struct {
126-
Name string \`json:"name"\`
134+
Name string `json:"name"`
127135
}
128136
129137
func HandleRequest(ctx context.Context, name MyEvent) (string, error) {

0 commit comments

Comments
 (0)