challenge-sync-airbus: Ready for 2024
This commit is contained in:
parent
5a6d9047c2
commit
ac966f9023
5 changed files with 273 additions and 115 deletions
|
|
@ -32,6 +32,20 @@ func loadTS(tspath string) (timestamp map[string]*TSValue, err error) {
|
|||
}
|
||||
}
|
||||
|
||||
func loadTSFromAPI(teams map[string]*AirbusTeam) (timestamp map[string]*TSValue, err error) {
|
||||
now := time.Now()
|
||||
timestamp = map[string]*TSValue{}
|
||||
|
||||
for _, team := range teams {
|
||||
timestamp[team.Name] = &TSValue{
|
||||
Time: now,
|
||||
Score: team.Score,
|
||||
}
|
||||
}
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
func saveTS(tspath string, ts map[string]*TSValue) error {
|
||||
if dryRun {
|
||||
tmp := map[string]TSValue{}
|
||||
|
|
|
|||
Reference in a new issue