Middleware upgrade (#554)

* Adds root level middleware

* Added todo

* Better way for extensions to be added.

* Bad conflict merge?
This commit is contained in:
Travis Reeder
2017-12-05 08:22:03 -08:00
committed by GitHub
parent 9a17c79a3b
commit 0798f9fac8
23 changed files with 660 additions and 287 deletions

View File

@@ -11,7 +11,11 @@ type Person struct {
}
func main() {
p := &Person{Name: "World"}
n := os.Getenv("NAME") // can grab name from env or input
if n == "" {
n = "World"
}
p := &Person{Name: n}
json.NewDecoder(os.Stdin).Decode(p)
fmt.Printf("Hello %v!\n", p.Name)
}