Skip to content

Instantly share code, notes, and snippets.

@c-lliope
Created April 11, 2017 00:00
Show Gist options
  • Save c-lliope/2a8f688482cbf53b81240abefeb1a2e3 to your computer and use it in GitHub Desktop.
Save c-lliope/2a8f688482cbf53b81240abefeb1a2e3 to your computer and use it in GitHub Desktop.
package main
import (
"encoding/json"
"fmt"
"os"
)
type Person struct {
Name string
}
func main() {
p := &Person{Name: "World"}
json.NewDecoder(os.Stdin).Decode(p)
fmt.Printf("Hello %v!", p.Name)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment