mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
readme mods
This commit is contained in:
@@ -35,21 +35,25 @@ curl -H "Content-Type: application/json" -X POST -d @hello.payload.json http://l
|
||||
|
||||
# In Review
|
||||
|
||||
1. We piped JSON data into the function at the command line: `cat hello.payload.json | fn run`
|
||||
1. We piped JSON data into the function at the command line
|
||||
```sh
|
||||
cat hello.payload.json | fn run
|
||||
```
|
||||
|
||||
2. We received our input through stdin: `json.NewDecoder(os.Stdin).Decode(p)`
|
||||
2. We received our input through stdin
|
||||
```go
|
||||
json.NewDecoder(os.Stdin).Decode(p)
|
||||
```
|
||||
|
||||
3. We wrote our output to stdout
|
||||
|
||||
```go
|
||||
fmt.Printf("Hello")
|
||||
```
|
||||
```go
|
||||
fmt.Printf("Hello")
|
||||
```
|
||||
|
||||
4. We sent stderr to the server logs
|
||||
|
||||
```go
|
||||
log.Println("here")
|
||||
```
|
||||
```go
|
||||
log.Println("here")
|
||||
```
|
||||
|
||||
# Next Up
|
||||
## [Tutorial 2: Input Parameters](examples/tutorial/params)
|
||||
Reference in New Issue
Block a user