github.com/mattn/anko@v0.1.10/packages/time.go (about) 1 package packages 2 3 import ( 4 "reflect" 5 "time" 6 7 "github.com/mattn/anko/env" 8 ) 9 10 func init() { 11 env.Packages["time"] = map[string]reflect.Value{ 12 "ANSIC": reflect.ValueOf(time.ANSIC), 13 "After": reflect.ValueOf(time.After), 14 "AfterFunc": reflect.ValueOf(time.AfterFunc), 15 "April": reflect.ValueOf(time.April), 16 "August": reflect.ValueOf(time.August), 17 "Date": reflect.ValueOf(time.Date), 18 "December": reflect.ValueOf(time.December), 19 "February": reflect.ValueOf(time.February), 20 "FixedZone": reflect.ValueOf(time.FixedZone), 21 "Friday": reflect.ValueOf(time.Friday), 22 "Hour": reflect.ValueOf(time.Hour), 23 "January": reflect.ValueOf(time.January), 24 "July": reflect.ValueOf(time.July), 25 "June": reflect.ValueOf(time.June), 26 "Kitchen": reflect.ValueOf(time.Kitchen), 27 "LoadLocation": reflect.ValueOf(time.LoadLocation), 28 "March": reflect.ValueOf(time.March), 29 "May": reflect.ValueOf(time.May), 30 "Microsecond": reflect.ValueOf(time.Microsecond), 31 "Millisecond": reflect.ValueOf(time.Millisecond), 32 "Minute": reflect.ValueOf(time.Minute), 33 "Monday": reflect.ValueOf(time.Monday), 34 "Nanosecond": reflect.ValueOf(time.Nanosecond), 35 "NewTicker": reflect.ValueOf(time.NewTicker), 36 "NewTimer": reflect.ValueOf(time.NewTimer), 37 "November": reflect.ValueOf(time.November), 38 "Now": reflect.ValueOf(time.Now), 39 "October": reflect.ValueOf(time.October), 40 "Parse": reflect.ValueOf(time.Parse), 41 "ParseDuration": reflect.ValueOf(time.ParseDuration), 42 "ParseInLocation": reflect.ValueOf(time.ParseInLocation), 43 "RFC1123": reflect.ValueOf(time.RFC1123), 44 "RFC1123Z": reflect.ValueOf(time.RFC1123Z), 45 "RFC3339": reflect.ValueOf(time.RFC3339), 46 "RFC3339Nano": reflect.ValueOf(time.RFC3339Nano), 47 "RFC822": reflect.ValueOf(time.RFC822), 48 "RFC822Z": reflect.ValueOf(time.RFC822Z), 49 "RFC850": reflect.ValueOf(time.RFC850), 50 "RubyDate": reflect.ValueOf(time.RubyDate), 51 "Saturday": reflect.ValueOf(time.Saturday), 52 "Second": reflect.ValueOf(time.Second), 53 "September": reflect.ValueOf(time.September), 54 "Since": reflect.ValueOf(time.Since), 55 "Sleep": reflect.ValueOf(time.Sleep), 56 "Stamp": reflect.ValueOf(time.Stamp), 57 "StampMicro": reflect.ValueOf(time.StampMicro), 58 "StampMilli": reflect.ValueOf(time.StampMilli), 59 "StampNano": reflect.ValueOf(time.StampNano), 60 "Sunday": reflect.ValueOf(time.Sunday), 61 "Thursday": reflect.ValueOf(time.Thursday), 62 "Tick": reflect.ValueOf(time.Tick), 63 "Tuesday": reflect.ValueOf(time.Tuesday), 64 "Unix": reflect.ValueOf(time.Unix), 65 "UnixDate": reflect.ValueOf(time.UnixDate), 66 "Wednesday": reflect.ValueOf(time.Wednesday), 67 } 68 env.PackageTypes["time"] = map[string]reflect.Type{ 69 "Duration": reflect.TypeOf(time.Duration(0)), 70 "Ticker": reflect.TypeOf(time.Ticker{}), 71 "Time": reflect.TypeOf(time.Time{}), 72 } 73 timeGo18() 74 timeGo110() 75 }