From b19a49335fdbccc60794903c01e230e074d41169 Mon Sep 17 00:00:00 2001 From: Dreamacro <305009791@qq.com> Date: Mon, 30 Dec 2019 23:01:24 +0800 Subject: [PATCH] Fix: http vehicle shouldn't save file --- adapters/provider/vehicle.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/adapters/provider/vehicle.go b/adapters/provider/vehicle.go index 83143194..0b949368 100644 --- a/adapters/provider/vehicle.go +++ b/adapters/provider/vehicle.go @@ -92,15 +92,12 @@ func (h *HTTPVehicle) Read() ([]byte, error) { if err != nil { return nil, err } + buf, err := ioutil.ReadAll(resp.Body) if err != nil { return nil, err } - if err := ioutil.WriteFile(h.path, buf, fileMode); err != nil { - return nil, err - } - return buf, nil }