GO - s50600822/Notes GitHub Wiki

https://stackoverflow.com/questions/33089523/how-to-mark-golang-struct-as-implementing-interface

type T struct{}
var _ I = T{}       // Verify that T implements I.
var _ I = (*T)(nil) // Verify that *T implements I.

time format

	input := "2017-08-31"
	t, _ := time.Parse("2006-01-02", input)
	fmt.Println(t)
	//fmt.Println(t.Format(time.REC3339))
	fmt.Println(t.Format("1970 - 01 - 01"))
	fmt.Println(t.Format("Jan 2nd 2006"))
	fmt.Println(t.Format(time.Kitchen))

profile

export GOPATH=$HOME/go
export PATH="$GOPATH/bin:$PATH"