Skip to content
This repository has been archived by the owner on Dec 4, 2020. It is now read-only.

Commit

Permalink
cmd/herder: cleanup some unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
Mateusz Czapliński committed Nov 20, 2020
1 parent 640ff69 commit a61fd9b
Showing 1 changed file with 0 additions and 37 deletions.
37 changes: 0 additions & 37 deletions cmd/herder/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,43 +52,6 @@ func main() {
pups = append(pups, pupColumn{len(pups), "pinata", cfg.Pinata})
}

// // Fetch thumbnails of hashes using cmd/downloader/
// for _, c := range cids {
// f := &file{
// hash: c.Hash,
// filename: c.Name,
// }
// _, loaded := hashes.LoadOrStore(c.Hash, f)
// if loaded {
// continue
// }
// // new file - start fetching it in background
// go func() {
// log.Printf("%s - starting to fetch...", f.hash)
// tree, err := node.API.Unixfs().Get(context.Background(), icorepath.New(f.hash))
// if err != nil {
// log.Printf("Could not get file with CID: %s", err)
// return
// }
// log.Printf("%s - found", f.hash)
// switch tree := tree.(type) {
// case ifiles.File:
// log.Printf("%s - is a file, thumbnailing", f.hash)
// th, err := thumbnailImage(tree, 100, 100)
// if err != nil {
// log.Printf("Could not create thumbnail of %s: %s", f.hash, err)
// return
// }
// f.contents = th
// hashes.Store(f.hash, f)
// log.Printf("%s - DONE", f.hash)
// thumbnails <- f.hash
// default:
// log.Printf("%s - is not a file, ignoring", f.hash)
// }
// }()
// }

// In a background loop, start fetching hashes from pups, to be fed into
// the GUI table.
//
Expand Down

0 comments on commit a61fd9b

Please sign in to comment.