# HG changeset patch # User Sascha L. Teichmann # Date 1549973088 -3600 # Node ID e57ba9585aaa2aa5253a1f0d2c02b38baece9a76 # Parent 3437ceee1529b086dde312a6efc975b29e604d38 Fairway availability import: More idiomatic code / cosmetics. diff -r 3437ceee1529 -r e57ba9585aaa pkg/imports/fa.go --- a/pkg/imports/fa.go Tue Feb 12 11:54:12 2019 +0100 +++ b/pkg/imports/fa.go Tue Feb 12 13:04:48 2019 +0100 @@ -286,10 +286,11 @@ client := ifaf.NewFairwayAvailabilityService(fa.URL, fa.Insecure, nil) - var bnIds []string - for _, bn := range bottlenecks { - bnIds = append(bnIds, bn.ID) + bnIds := make([]string, len(bottlenecks)) + for i := range bottlenecks { + bnIds[i] = bottlenecks[i].ID } + var period ifaf.RequestedPeriod period.Date_start = latestDate.Time period.Date_end = time.Now()