Skip to content

Commit

Permalink
Minor adjustments to fix golang warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
timetinytim committed Sep 10, 2024
1 parent 8a2fd6d commit 6f6e5b0
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions toot-relay.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
"crypto/x509"
"encoding/base64"
"encoding/binary"
"errors"
"flag"
"fmt"
"net/http"
Expand Down Expand Up @@ -242,7 +241,7 @@ func encodedValue(header http.Header, name, key string) (string, error) {
keyValues := parseKeyValues(header.Get(name))
value, exists := keyValues[key]
if !exists {
return "", errors.New(fmt.Sprintf("Value %s not found in header %s", key, name))
return "", fmt.Errorf("value %s not found in header %s", key, name)
}

bytes, err := base64.RawURLEncoding.DecodeString(value)
Expand Down

0 comments on commit 6f6e5b0

Please sign in to comment.