comparison pkg/wfs/download.go @ 2620:a8ebc785823d

WFS download: Removed waiting for configuration in feature download. It slipped in when added WFS error handling.
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Wed, 13 Mar 2019 15:20:19 +0100
parents 8a6ed058af22
children 02505fcff63c
comparison
equal deleted inserted replaced
2616:be60888e7c43 2620:a8ebc785823d
24 "net/http" 24 "net/http"
25 "net/url" 25 "net/url"
26 "strconv" 26 "strconv"
27 "strings" 27 "strings"
28 28
29 "gemma.intevation.de/gemma/pkg/config"
30 "golang.org/x/net/html/charset" 29 "golang.org/x/net/html/charset"
31 ) 30 )
32 31
33 var ( 32 var (
34 // ErrNoSuchFeatureType is returned when a feature is not supported. 33 // ErrNoSuchFeatureType is returned when a feature is not supported.
381 } 380 }
382 381
383 // DownloadURLs does the actual GetFeature requests downloads 382 // DownloadURLs does the actual GetFeature requests downloads
384 // and hands the resulting io.Readers over to the given handler. 383 // and hands the resulting io.Readers over to the given handler.
385 func DownloadURLs(urls []string, handler func(string, io.Reader) error) error { 384 func DownloadURLs(urls []string, handler func(string, io.Reader) error) error {
386 config.WaitReady()
387 for _, url := range urls { 385 for _, url := range urls {
388 if err := downloadURL(url, handler); err != nil { 386 if err := downloadURL(url, handler); err != nil {
389 return err 387 return err
390 } 388 }
391 } 389 }