Files
fn-serverless/examples/tutorial/hello/go/usingdeps/func.go
Reed Allman 1cdb47d6e9 server, examples, extensions lint compliant (#1109)
these are all automated changes suggested by golint
2018-07-04 15:23:15 +01:00

25 lines
482 B
Go

package main
import (
"encoding/json"
"os"
"github.com/sirupsen/logrus"
)
type person struct {
Name string
}
func main() {
p := &person{Name: "World"}
json.NewDecoder(os.Stdin).Decode(p)
logrus.Printf("Hello %v!\n", p.Name)
logrus.Println("---> stderr goes to the server logs.")
logrus.Println("---> LINE 2")
logrus.Println("---> LINE 3 with a break right here\nand LINE 4")
logrus.Println("---> LINE 5 with a double line break\n ")
logrus.Println("---> LINE 6")
}