package main

import (
	"fmt"
	"time"

	"github.com/kr/pretty"
)

type User struct {
	ID    int
	Name  string
	Email string
}

func main() {
	// print a struct
	u := User{Name: "Homer Simpson", Email: "homer@example.com"}
	pretty.Println(u)

	// print a slice
	data := []string{"one", "", "32"}
	pretty.Println(data)

	// print time:
	t := time.Now()
	pretty.Println(t)
	fmt.Println(t)

	// embedded pointer in an anonymous struct (we'll cover these in depth later)
	admin := struct {
		permissions map[int]string
		*User
	}{
		map[int]string{1: "admin"},
		&User{
			ID:    2,
			Name:  "Rob Pike",
			Email: "commander@golang.org",
		},
	}

	fmt.Println(admin)
	pretty.Println(admin)

}
