()
| 31 | } |
| 32 | |
| 33 | func LoadExpiredLocation() *time.Location { |
| 34 | var ( |
| 35 | expiredLoc *time.Location |
| 36 | expiredLocOnce sync.Once |
| 37 | ) |
| 38 | expiredLocOnce.Do(func() { |
| 39 | loc, err := time.LoadLocation(LoadTimeZoneByCmd()) |
| 40 | if err != nil { |
| 41 | expiredLoc = time.Local |
| 42 | return |
| 43 | } |
| 44 | expiredLoc = loc |
| 45 | }) |
| 46 | if expiredLoc == nil { |
| 47 | return time.Local |
| 48 | } |
| 49 | return expiredLoc |
| 50 | } |
nothing calls this directly
no test coverage detected