1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-08-11 17:51:01 +00:00

Setup golangci-lint Github Action

This commit is contained in:
Frédéric Guillot 2021-03-22 21:04:10 -07:00 committed by fguillot
parent 9242350f0e
commit 6e2e2d1665
14 changed files with 52 additions and 66 deletions

View file

@ -345,7 +345,7 @@ func (c *Client) MarkFeedAsRead(feedID int64) error {
// RefreshAllFeeds refreshes all feeds.
func (c *Client) RefreshAllFeeds() error {
_, err := c.request.Put(fmt.Sprintf("/v1/feeds/refresh"), nil)
_, err := c.request.Put("/v1/feeds/refresh", nil)
return err
}

View file

@ -82,9 +82,9 @@ func (r *request) execute(method, path string, data interface{}) (io.ReadCloser,
}
if data != nil {
switch data.(type) {
switch data := data.(type) {
case io.ReadCloser:
request.Body = data.(io.ReadCloser)
request.Body = data
default:
request.Body = io.NopCloser(bytes.NewBuffer(r.toJSON(data)))
}