1
0
Fork 0
mirror of https://github.com/vbatts/talks.git synced 2025-05-24 05:42:32 +00:00

2013-03: adding an old learning lunch

This commit is contained in:
Vincent Batts 2016-12-05 10:44:45 -05:00
parent 68f582d393
commit 24cea0199b
17 changed files with 718 additions and 0 deletions

View file

@ -0,0 +1,27 @@
package main
import (
"fmt"
"time"
)
type Person struct {
Name string
Dob *time.Time
}
func main() {
// START OMIT
t, err := time.Parse(time.RFC822, "27 Mar 75 00:00 EST")
if (err != nil) {
fmt.Println(err)
return
}
p := Person{Name: "John Doe", Dob: &t }
fmt.Printf("%q\n", p)
// STOP OMIT
//fmt.Printf("%s\n", p.Name)
//fmt.Printf("%s\n", p.Dob.String())
}