Files
fn-serverless/examples/tutorial/hello/go/func.go
Chad Arimura f97ac83255 more tutorial
2017-05-25 14:31:22 -07:00

21 lines
271 B
Go

package main
import (
"encoding/json"
"fmt"
"log"
"os"
)
type Person struct {
Name string
}
func main() {
p := &Person{Name: "World"}
json.NewDecoder(os.Stdin).Decode(p)
fmt.Printf("Hello %v!\n", p.Name)
log.Println("---> stderr goes to the server logs.")
}