WIP: feat: translation support
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
See #483
This commit is contained in:
@ -3,11 +3,13 @@ package web
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"errors"
|
||||
"io"
|
||||
"net/http"
|
||||
"os"
|
||||
"time"
|
||||
|
||||
"github.com/leonelquinteros/gotext"
|
||||
)
|
||||
|
||||
// Timeout is the time it takes before a web request bails out waiting for a
|
||||
@ -40,7 +42,7 @@ func GetFile(filepath string, url string) (err error) {
|
||||
defer resp.Body.Close()
|
||||
|
||||
if resp.StatusCode != http.StatusOK {
|
||||
return fmt.Errorf("bad status: %s", resp.Status)
|
||||
return errors.New(gotext.Get("bad status: %s", resp.Status))
|
||||
}
|
||||
|
||||
_, err = io.Copy(out, resp.Body)
|
||||
|
Reference in New Issue
Block a user