cmd/torrent-metainfo-pprint: Use bufio input and enable envpprof

This commit is contained in:
Matt Joiner 2018-06-17 16:20:02 +10:00
parent 4fafad46b2
commit 2b1068885c
1 changed files with 4 additions and 1 deletions

View File

@ -1,6 +1,7 @@
package main
import (
"bufio"
"encoding/hex"
"encoding/json"
"fmt"
@ -8,6 +9,7 @@ import (
"log"
"os"
"github.com/anacrolix/envpprof"
"github.com/anacrolix/tagflag"
"github.com/bradfitz/iter"
@ -62,8 +64,9 @@ func processReader(r io.Reader) error {
}
func main() {
defer envpprof.Stop()
tagflag.Parse(&flags)
err := processReader(os.Stdin)
err := processReader(bufio.NewReader(os.Stdin))
if err != nil {
log.Fatal(err)
}