github.com/ledgerwatch/erigon-lib@v1.0.0/downloader/snaptype/webseeds.go (about) 1 package snaptype 2 3 import "github.com/anacrolix/torrent/metainfo" 4 5 // Each provider can provide only 1 WebSeed url per file 6 // but overall BitTorrent protocol allowing multiple 7 type WebSeedsFromProvider map[string]string // fileName -> Url, can be Http/Ftp 8 9 type WebSeeds map[string]metainfo.UrlList // fileName -> []Url, can be Http/Ftp 10 11 func NewWebSeeds(list []WebSeedsFromProvider) WebSeeds { 12 merged := WebSeeds{} 13 for _, m := range list { 14 for name, wUrl := range m { 15 merged[name] = append(merged[name], wUrl) 16 } 17 } 18 return merged 19 }