mirror of
https://github.com/TehPeGaSuS/xmasbot.git
synced 2026-07-09 20:05:46 +02:00
13aca7a218
This utility tests TZ string splitting and sorts the zones in reverse order.
27 lines
398 B
Go
27 lines
398 B
Go
// This utility tests TZ string splitting
|
|
package main
|
|
|
|
import (
|
|
"encoding/json"
|
|
"fmt"
|
|
"log"
|
|
"sort"
|
|
|
|
"github.com/TehPeGaSuS/xmasbot/nyb"
|
|
)
|
|
|
|
func main() {
|
|
var zones nyb.TZS
|
|
err := json.Unmarshal(nyb.Zones, &zones)
|
|
if err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
|
|
sort.Sort(sort.Reverse(zones))
|
|
|
|
for _, k := range zones {
|
|
fmt.Println("**********************")
|
|
fmt.Println(k.Format(200, true))
|
|
}
|
|
}
|