Files
letsGO/struct/main.go
T

24 lines
263 B
Go

package main
import (
"fmt"
"time"
)
type Employee struct {
Name string
EID int
Boss *Employee
Hired time.Time
}
func main() {
e := Employee{
Name: "Zack",
EID: 1,
Hired: time.Now(),
}
fmt.Println(e.Name, e.Hired.Format(time.RFC1123))
}