2
0
mirror of synced 2025-02-25 07:05:38 +00:00
Matt Joiner fc4fab91f5 Switch to goimports import sorting
Used to use sortimports, but it's old, and goimports seems to have an opinion now.
2018-11-02 23:12:01 +11:00

25 lines
412 B
Go

package main
import (
"fmt"
"log"
"github.com/anacrolix/tagflag"
"github.com/anacrolix/torrent/metainfo"
)
func main() {
var args struct {
tagflag.StartPos
Files []string `arity:"+" type:"pos"`
}
tagflag.Parse(&args)
for _, arg := range args.Files {
mi, err := metainfo.LoadFromFile(arg)
if err != nil {
log.Fatal(err)
}
fmt.Printf("%s: %s\n", mi.HashInfoBytes().HexString(), arg)
}
}