Remove unkeyed composite literals.

This was done to keep in accordance with `go vet`.
This commit is contained in:
Jimmy Zelinskie 2014-10-28 12:26:37 -04:00
parent bbf85de692
commit d46beb0f7d
2 changed files with 6 additions and 2 deletions

View file

@ -84,7 +84,9 @@ func TestTorrentPurging(t *testing.T) {
func TestStalePeerPurging(t *testing.T) {
cfg := config.DefaultConfig
cfg.Announce = config.Duration{10 * time.Millisecond}
cfg.Announce = config.Duration{
Duration: 10 * time.Millisecond,
}
srv, err := setupTracker(&cfg)
if err != nil {

View file

@ -24,5 +24,7 @@ func (tkr *Tracker) HandleScrape(scrape *models.Scrape, w Writer) (err error) {
torrents = append(torrents, torrent)
}
return w.WriteScrape(&models.ScrapeResponse{torrents})
return w.WriteScrape(&models.ScrapeResponse{
Files: torrents,
})
}