Skip to content

Commit

Permalink
Moved LoadLocationFromTZData to Go 1.10
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelS11 committed Jun 20, 2018
1 parent 9ee823c commit 7d5c94f
Show file tree
Hide file tree
Showing 3 changed files with 73 additions and 57 deletions.
114 changes: 57 additions & 57 deletions packages/time.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,67 +6,67 @@ import (

func init() {
Packages["time"] = map[string]interface{}{
"ANSIC": time.ANSIC,
"After": time.After,
"AfterFunc": time.AfterFunc,
"April": time.April,
"August": time.August,
"Date": time.Date,
"December": time.December,
"February": time.February,
"FixedZone": time.FixedZone,
"Friday": time.Friday,
"Hour": time.Hour,
"January": time.January,
"July": time.July,
"June": time.June,
"Kitchen": time.Kitchen,
"LoadLocation": time.LoadLocation,
"LoadLocationFromTZData": time.LoadLocationFromTZData,
"March": time.March,
"May": time.May,
"Microsecond": time.Microsecond,
"Millisecond": time.Millisecond,
"Minute": time.Minute,
"Monday": time.Monday,
"Nanosecond": time.Nanosecond,
"NewTicker": time.NewTicker,
"NewTimer": time.NewTimer,
"November": time.November,
"Now": time.Now,
"October": time.October,
"Parse": time.Parse,
"ParseDuration": time.ParseDuration,
"ParseInLocation": time.ParseInLocation,
"RFC1123": time.RFC1123,
"RFC1123Z": time.RFC1123Z,
"RFC3339": time.RFC3339,
"RFC3339Nano": time.RFC3339Nano,
"RFC822": time.RFC822,
"RFC822Z": time.RFC822Z,
"RFC850": time.RFC850,
"RubyDate": time.RubyDate,
"Saturday": time.Saturday,
"Second": time.Second,
"September": time.September,
"Since": time.Since,
"Sleep": time.Sleep,
"Stamp": time.Stamp,
"StampMicro": time.StampMicro,
"StampMilli": time.StampMilli,
"StampNano": time.StampNano,
"Sunday": time.Sunday,
"Thursday": time.Thursday,
"Tick": time.Tick,
"Tuesday": time.Tuesday,
"Unix": time.Unix,
"UnixDate": time.UnixDate,
"Until": time.Until,
"Wednesday": time.Wednesday,
"ANSIC": time.ANSIC,
"After": time.After,
"AfterFunc": time.AfterFunc,
"April": time.April,
"August": time.August,
"Date": time.Date,
"December": time.December,
"February": time.February,
"FixedZone": time.FixedZone,
"Friday": time.Friday,
"Hour": time.Hour,
"January": time.January,
"July": time.July,
"June": time.June,
"Kitchen": time.Kitchen,
"LoadLocation": time.LoadLocation,
"March": time.March,
"May": time.May,
"Microsecond": time.Microsecond,
"Millisecond": time.Millisecond,
"Minute": time.Minute,
"Monday": time.Monday,
"Nanosecond": time.Nanosecond,
"NewTicker": time.NewTicker,
"NewTimer": time.NewTimer,
"November": time.November,
"Now": time.Now,
"October": time.October,
"Parse": time.Parse,
"ParseDuration": time.ParseDuration,
"ParseInLocation": time.ParseInLocation,
"RFC1123": time.RFC1123,
"RFC1123Z": time.RFC1123Z,
"RFC3339": time.RFC3339,
"RFC3339Nano": time.RFC3339Nano,
"RFC822": time.RFC822,
"RFC822Z": time.RFC822Z,
"RFC850": time.RFC850,
"RubyDate": time.RubyDate,
"Saturday": time.Saturday,
"Second": time.Second,
"September": time.September,
"Since": time.Since,
"Sleep": time.Sleep,
"Stamp": time.Stamp,
"StampMicro": time.StampMicro,
"StampMilli": time.StampMilli,
"StampNano": time.StampNano,
"Sunday": time.Sunday,
"Thursday": time.Thursday,
"Tick": time.Tick,
"Tuesday": time.Tuesday,
"Unix": time.Unix,
"UnixDate": time.UnixDate,
"Until": time.Until,
"Wednesday": time.Wednesday,
}
PackageTypes["time"] = map[string]interface{}{
"Duration": time.Duration(0),
"Ticker": time.Ticker{},
"Time": time.Time{},
}
timeGo110()
}
11 changes: 11 additions & 0 deletions packages/timeGo110.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// +build go1.10

package packages

import (
"time"
)

func timeGo110() {
Packages["time"]["LoadLocationFromTZData"] = time.LoadLocationFromTZData
}
5 changes: 5 additions & 0 deletions packages/timeNotGo110.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
// +build !go1.10

package packages

func timeGo110() {}

0 comments on commit 7d5c94f

Please sign in to comment.