cmd/torrent-infohash update for API changes
This commit is contained in:
parent
b5812bb0b7
commit
9c36d36654
|
@ -5,11 +5,13 @@ import (
|
||||||
"log"
|
"log"
|
||||||
|
|
||||||
"github.com/anacrolix/tagflag"
|
"github.com/anacrolix/tagflag"
|
||||||
|
|
||||||
"github.com/anacrolix/torrent/metainfo"
|
"github.com/anacrolix/torrent/metainfo"
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
var args struct {
|
var args struct {
|
||||||
|
tagflag.StartPos
|
||||||
Files []string `arity:"+" type:"pos"`
|
Files []string `arity:"+" type:"pos"`
|
||||||
}
|
}
|
||||||
tagflag.Parse(&args)
|
tagflag.Parse(&args)
|
||||||
|
@ -18,6 +20,6 @@ func main() {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
}
|
}
|
||||||
fmt.Printf("%x: %s\n", mi.Info.Hash, arg)
|
fmt.Printf("%s: %s\n", mi.Info.Hash().HexString(), arg)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue