style: prefer stdlib idioms for errors and http methods

This commit is contained in:
Mathis Maquenne
2026-08-05 21:43:59 +02:00
parent a695fb4de3
commit c1775e5c04
12 changed files with 50 additions and 44 deletions
+2 -1
View File
@@ -3,6 +3,7 @@ package update
import (
"context"
"encoding/json"
"errors"
"fmt"
"io"
"runtime"
@@ -46,7 +47,7 @@ func (u *Updater) Latest(ctx context.Context) (*Release, error) {
return nil, fmt.Errorf("failed to decode release: %w", err)
}
if release.TagName == "" {
return nil, fmt.Errorf("release has no tag name")
return nil, errors.New("release has no tag name")
}
return &release, nil