1
0
Fork 0
mirror of https://github.com/miniflux/v2.git synced 2025-09-30 19:22:11 +00:00

refactor: avoid unnecessary usage of Printf

This commit is contained in:
Julien Voisin 2025-09-08 20:54:16 +02:00 committed by GitHub
parent d70817e441
commit 84078c7c20
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 8 additions and 7 deletions

View file

@ -50,7 +50,7 @@ func (c *Client) SaveURL(entryURL string) error {
return fmt.Errorf("karakeep: unable to create request: %v", err)
}
req.Header.Set("Authorization", fmt.Sprintf("Bearer %s", c.apiToken))
req.Header.Set("Authorization", "Bearer "+c.apiToken)
req.Header.Set("Content-Type", "application/json")
req.Header.Set("User-Agent", "Miniflux/"+version.Version)

View file

@ -90,7 +90,7 @@ func (c *Client) makeRequest(payload any) error {
// See https://docs.ntfy.sh/publish/#access-tokens
if c.ntfyApiToken != "" {
request.Header.Set("Authorization", fmt.Sprintf("Bearer %s", c.ntfyApiToken))
request.Header.Set("Authorization", "Bearer "+c.ntfyApiToken)
}
// See https://docs.ntfy.sh/publish/#username-password