From bf7d9e95b7837316e7dfc5f57865b991427eaab0 Mon Sep 17 00:00:00 2001 From: lordwelch Date: Thu, 30 Nov 2017 20:03:20 -0700 Subject: [PATCH] Print open error --- main.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index baa4f0f..ede127d 100644 --- a/main.go +++ b/main.go @@ -60,9 +60,10 @@ func process(torrentFile string) *SceneVideoTorrent { mt *MetaTorrent = new(MetaTorrent) vt *SceneVideoTorrent = new(SceneVideoTorrent) ) - f, _ := os.OpenFile(torrentFile, os.O_RDONLY, 755) + f, err := os.OpenFile(torrentFile, os.O_RDONLY, 755) + fmt.Println("File: ",err) err := mt.ReadFile(f) - fmt.Println(err) + fmt.Println("Read: "err) fmt.Printf("%+v\n", mt) vt.Torrent = NewTorrent(*mt) vt.Parse(vt.Name)