Skip to content

Commit 18d9078

Browse files
committed
♻️ Synced dbin 📦 <-- utility.go: remove UA ⌚
1 parent 94883fb commit 18d9078

File tree

4 files changed

+9
-3
lines changed

4 files changed

+9
-3
lines changed

fetch.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,6 +292,7 @@ func createHTTPRequest(ctx context.Context, method, url string) (*http.Request,
292292
req.Header.Set("Pragma", "no-cache")
293293
req.Header.Set("Expires", "0")
294294
req.Header.Set("User-Agent", fmt.Sprintf("dbin/%.1f", version))
295+
295296
return req, nil
296297
}
297298

go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ toolchain go1.24.3
66

77
require (
88
github.com/a-h/templ v0.3.898
9-
github.com/breml/rootcerts v0.2.22
9+
github.com/breml/rootcerts v0.3.0
1010
github.com/fxamacker/cbor/v2 v2.8.0
1111
github.com/goccy/go-json v0.10.5
1212
github.com/goccy/go-yaml v1.18.0
@@ -25,7 +25,7 @@ require (
2525
)
2626

2727
require (
28-
github.com/klauspost/cpuid/v2 v2.2.10 // indirect
28+
github.com/klauspost/cpuid/v2 v2.2.11 // indirect
2929
github.com/tdewolff/parse/v2 v2.8.1 // indirect
3030
github.com/x448/float16 v0.8.4 // indirect
3131
golang.org/x/crypto v0.39.0 // indirect

go.sum

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ github.com/a-h/templ v0.3.898 h1:g9oxL/dmM6tvwRe2egJS8hBDQTncokbMoOFk1oJMX7s=
22
github.com/a-h/templ v0.3.898/go.mod h1:oLBbZVQ6//Q6zpvSMPTuBK0F3qOtBdFBcGRspcT+VNQ=
33
github.com/breml/rootcerts v0.2.22 h1:s0OUIevfnTA+Yk1vO2qM1ye156DW2yUPaWXWrWzOa44=
44
github.com/breml/rootcerts v0.2.22/go.mod h1:S/PKh+4d1HUn4HQovEB8hPJZO6pUZYrIhmXBhsegfXw=
5+
github.com/breml/rootcerts v0.3.0 h1:lED3QcIJvBsWta8faA/EXq9L+5nTwNMRyMTbA9UkzCM=
6+
github.com/breml/rootcerts v0.3.0/go.mod h1:S/PKh+4d1HUn4HQovEB8hPJZO6pUZYrIhmXBhsegfXw=
57
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
68
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
79
github.com/fxamacker/cbor/v2 v2.8.0 h1:fFtUGXUzXPHTIUdne5+zzMPTfffl3RD5qYnkY40vtxU=
@@ -20,6 +22,8 @@ github.com/klauspost/compress v1.18.0 h1:c/Cqfb0r+Yi+JtIEq73FWXVkRonBlf0CRNYc8Zt
2022
github.com/klauspost/compress v1.18.0/go.mod h1:2Pp+KzxcywXVXMr50+X0Q/Lsb43OQHYWRCY2AiWywWQ=
2123
github.com/klauspost/cpuid/v2 v2.2.10 h1:tBs3QSyvjDyFTq3uoc/9xFpCuOsJQFNPiAhYdw2skhE=
2224
github.com/klauspost/cpuid/v2 v2.2.10/go.mod h1:hqwkgyIinND0mEev00jJYCxPNVRVXFQeu1XKlok6oO0=
25+
github.com/klauspost/cpuid/v2 v2.2.11 h1:0OwqZRYI2rFrjS4kvkDnqJkKHdHaRnCm68/DY4OxRzU=
26+
github.com/klauspost/cpuid/v2 v2.2.11/go.mod h1:hqwkgyIinND0mEev00jJYCxPNVRVXFQeu1XKlok6oO0=
2327
github.com/pkg/xattr v0.4.11 h1:DA7usy0rTMNMGvm06b5LhZUwiPj708D89S8DkXpMB1E=
2428
github.com/pkg/xattr v0.4.11/go.mod h1:di8WF84zAKk8jzR1UBTEWh9AUlIZZ7M/JNt8e9B6ktU=
2529
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=

utility.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import (
77
"net/http"
88
"os"
99
"path/filepath"
10+
"strconv"
1011
"strings"
1112
"time"
1213

@@ -388,7 +389,7 @@ func accessCachedOrFetch(url, filename string, cfg *config, syncInterval time.Du
388389
}
389390
req.Header.Set("Cache-Control", "no-cache, no-store, must-revalidate")
390391
req.Header.Set("Pragma", "no-cache")
391-
req.Header.Set("User-Agent", fmt.Sprintf("dbin/%.1f", version))
392+
req.Header.Set("dbin", strconv.FormatFloat(version, 'f', -1, 32))
392393
client := &http.Client{}
393394
response, err := client.Do(req)
394395
if err != nil {

0 commit comments

Comments
 (0)