projects
/
btrtrc.git
/ commitdiff
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9230a1b
)
cmd/torrent-infohash: Switch to tagflag
author
Matt Joiner <anacrolix@gmail.com>
Sun, 22 Nov 2015 07:49:44 +0000 (18:49 +1100)
committer
Matt Joiner <anacrolix@gmail.com>
Sun, 22 Nov 2015 07:49:44 +0000 (18:49 +1100)
cmd/torrent-infohash/main.go
patch
|
blob
|
history
diff --git
a/cmd/torrent-infohash/main.go
b/cmd/torrent-infohash/main.go
index bcbf08ec9efde655efb16065dcbc50a70b3f8045..4fb7004bfee81c1ae78fb9e34e9a5775e4f1a123 100644
(file)
--- a/
cmd/torrent-infohash/main.go
+++ b/
cmd/torrent-infohash/main.go
@@
-1,16
+1,19
@@
package main
import (
- "flag"
"fmt"
"log"
+ "github.com/anacrolix/tagflag"
"github.com/anacrolix/torrent/metainfo"
)
func main() {
- flag.Parse()
- for _, arg := range flag.Args() {
+ var args struct {
+ Files []string `arity:"+" type:"pos"`
+ }
+ tagflag.Parse(&args)
+ for _, arg := range args.Files {
mi, err := metainfo.LoadFromFile(arg)
if err != nil {
log.Fatal(err)