Skip to content

Commit 83c041a

Browse files
chore(deps): update module mvdan.cc/gofumpt to v0.9.0 (#7292)
This PR contains the following updates: | Package | Change | Age | Confidence | |---|---|---|---| | [mvdan.cc/gofumpt](https://redirect.github.com/mvdan/gofumpt) | `v0.8.0` -> `v0.9.0` | [![age](https://developer.mend.io/api/mc/badges/age/go/mvdan.cc%2fgofumpt/v0.9.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/go/mvdan.cc%2fgofumpt/v0.8.0/v0.9.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- > [!WARNING] > Some dependencies could not be looked up. Check the Dependency Dashboard for more information. --- ### Release Notes <details> <summary>mvdan/gofumpt (mvdan.cc/gofumpt)</summary> ### [`v0.9.0`](https://redirect.github.com/mvdan/gofumpt/blob/HEAD/CHANGELOG.md#v090---2025-09-02) [Compare Source](https://redirect.github.com/mvdan/gofumpt/compare/v0.8.0...v0.9.0) This release is based on Go 1.25's gofmt, and requires Go 1.24 or later. A new rule is introduced to "clothe" naked returns for the sake of clarity. While there is nothing wrong with naming results in function signatures, using lone `return` statements can be confusing to the reader. Go 1.25's `ignore` directives in `go.mod` files are now obeyed; any directories within the module matching any of the patterns are now omitted when walking directories, such as with `gofumpt -w .`. Module information is now loaded via Go's [`x/mod/modfile` package](https://pkg.go.dev/golang.org/x/mod/modfile) rather than executing `go mod edit -json`, which is way faster. This should result in moderate speed-ups when formatting many directories. </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/open-telemetry/opentelemetry-go). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MS45MS4xIiwidXBkYXRlZEluVmVyIjoiNDEuOTEuMSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiU2tpcCBDaGFuZ2Vsb2ciLCJkZXBlbmRlbmNpZXMiXX0=--> --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: dmathieu <[email protected]>
1 parent 295fbdc commit 83c041a

File tree

14 files changed

+41
-43
lines changed

14 files changed

+41
-43
lines changed

attribute/iterator_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ func TestMergedIterator(t *testing.T) {
5656
for _, k := range keys {
5757
result = append(result, attribute.Int(k, num))
5858
}
59-
return
59+
return result
6060
}
6161

6262
for _, input := range []inputs{

baggage/baggage.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -648,7 +648,7 @@ func parsePropertyInternal(s string) (p Property, ok bool) {
648648
// If we couldn't find any valid key character,
649649
// it means the key is either empty or invalid.
650650
if keyStart == keyEnd {
651-
return
651+
return p, ok
652652
}
653653

654654
// Skip spaces after the key: " key< >= value ".
@@ -658,13 +658,13 @@ func parsePropertyInternal(s string) (p Property, ok bool) {
658658
// A key can have no value, like: " key ".
659659
ok = true
660660
p.key = s[keyStart:keyEnd]
661-
return
661+
return p, ok
662662
}
663663

664664
// If we have not reached the end and we can't find the '=' delimiter,
665665
// it means the property is invalid.
666666
if s[index] != keyValueDelimiter[0] {
667-
return
667+
return p, ok
668668
}
669669

670670
// Attempting to parse the value.
@@ -690,14 +690,14 @@ func parsePropertyInternal(s string) (p Property, ok bool) {
690690
// we have not reached the end, it means the property is
691691
// invalid, something like: " key = value value1".
692692
if index != len(s) {
693-
return
693+
return p, ok
694694
}
695695

696696
// Decode a percent-encoded value.
697697
rawVal := s[valueStart:valueEnd]
698698
unescapeVal, err := url.PathUnescape(rawVal)
699699
if err != nil {
700-
return
700+
return p, ok
701701
}
702702
value := replaceInvalidUTF8Sequences(len(rawVal), unescapeVal)
703703

@@ -706,7 +706,7 @@ func parsePropertyInternal(s string) (p Property, ok bool) {
706706
p.hasValue = true
707707

708708
p.value = value
709-
return
709+
return p, ok
710710
}
711711

712712
func skipSpace(s string, offset int) int {

bridge/opentracing/mix_test.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -568,9 +568,8 @@ func (bio *baggageInteroperationTest) addAndRecordBaggage(t *testing.T, ctx cont
568568
return ctx
569569
}
570570

571-
func generateBaggageKeys(key string) (otKey, otelKey string) {
572-
otKey, otelKey = key+"-Ot", key+"-Otel"
573-
return
571+
func generateBaggageKeys(key string) (string, string) {
572+
return key + "-Ot", key + "-Otel"
574573
}
575574

576575
// helpers

exporters/otlp/otlptrace/otlptracehttp/mock_collector_test.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,15 +145,16 @@ func (c *mockCollector) getInjectHTTPStatus() int {
145145
return status
146146
}
147147

148-
func (c *mockCollector) getInjectResponseHeader() (h map[string]string) {
148+
func (c *mockCollector) getInjectResponseHeader() map[string]string {
149+
var h map[string]string
149150
if len(c.injectResponseHeader) == 0 {
150-
return
151+
return h
151152
}
152153
h, c.injectResponseHeader = c.injectResponseHeader[0], c.injectResponseHeader[1:]
153154
if len(c.injectResponseHeader) == 0 {
154155
c.injectResponseHeader = nil
155156
}
156-
return
157+
return h
157158
}
158159

159160
func readRequest(r *http.Request) ([]byte, error) {

internal/tools/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,6 @@ require (
234234
gopkg.in/warnings.v0 v0.1.2 // indirect
235235
gopkg.in/yaml.v3 v3.0.1 // indirect
236236
honnef.co/go/tools v0.6.1 // indirect
237-
mvdan.cc/gofumpt v0.8.0 // indirect
237+
mvdan.cc/gofumpt v0.9.0 // indirect
238238
mvdan.cc/unparam v0.0.0-20250301125049-0df0534333a4 // indirect
239239
)

internal/tools/go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -673,7 +673,7 @@ gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
673673
gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
674674
honnef.co/go/tools v0.6.1 h1:R094WgE8K4JirYjBaOpz/AvTyUu/3wbmAoskKN/pxTI=
675675
honnef.co/go/tools v0.6.1/go.mod h1:3puzxxljPCe8RGJX7BIy1plGbxEOZni5mR2aXe3/uk4=
676-
mvdan.cc/gofumpt v0.8.0 h1:nZUCeC2ViFaerTcYKstMmfysj6uhQrA2vJe+2vwGU6k=
677-
mvdan.cc/gofumpt v0.8.0/go.mod h1:vEYnSzyGPmjvFkqJWtXkh79UwPWP9/HMxQdGEXZHjpg=
676+
mvdan.cc/gofumpt v0.9.0 h1:W0wNHMSvDBDIyZsm3nnGbVfgp5AknzBrGJnfLCy501w=
677+
mvdan.cc/gofumpt v0.9.0/go.mod h1:3xYtNemnKiXaTh6R4VtlqDATFwBbdXI8lJvH/4qk7mw=
678678
mvdan.cc/unparam v0.0.0-20250301125049-0df0534333a4 h1:WjUu4yQoT5BHT1w8Zu56SP8367OuBV5jvo+4Ulppyf8=
679679
mvdan.cc/unparam v0.0.0-20250301125049-0df0534333a4/go.mod h1:rthT7OuvRbaGcd5ginj6dA2oLE7YNlta9qhBNNdCaLE=

propagation/propagators_test.go

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,22 +24,20 @@ var (
2424
spanID = mustSpanIDFromHex(spanIDStr)
2525
)
2626

27-
func mustTraceIDFromHex(s string) (t trace.TraceID) {
28-
var err error
29-
t, err = trace.TraceIDFromHex(s)
27+
func mustTraceIDFromHex(s string) trace.TraceID {
28+
t, err := trace.TraceIDFromHex(s)
3029
if err != nil {
3130
panic(err)
3231
}
33-
return
32+
return t
3433
}
3534

36-
func mustSpanIDFromHex(s string) (t trace.SpanID) {
37-
var err error
38-
t, err = trace.SpanIDFromHex(s)
35+
func mustSpanIDFromHex(s string) trace.SpanID {
36+
t, err := trace.SpanIDFromHex(s)
3937
if err != nil {
4038
panic(err)
4139
}
42-
return
40+
return t
4341
}
4442

4543
type outOfThinAirPropagator struct {

semconv/internal/http.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ func hostIPNamePort(hostWithPort string) (ip, name string, port int) {
121121
if parsedPort, err = strconv.ParseUint(portPart, 10, 16); err == nil {
122122
port = int(parsedPort) // nolint: gosec // Bit size of 16 checked above.
123123
}
124-
return
124+
return ip, name, port
125125
}
126126

127127
// EndUserAttributesFromHTTPRequest generates attributes of the

semconv/internal/v2/http.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ func firstHostPort(source ...string) (host string, port int) {
285285
break
286286
}
287287
}
288-
return
288+
return host, port
289289
}
290290

291291
// RequestHeader returns the contents of h as OpenTelemetry attributes.

semconv/internal/v2/net.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -287,27 +287,27 @@ func splitHostPort(hostport string) (host string, port int) {
287287
addrEnd := strings.LastIndex(hostport, "]")
288288
if addrEnd < 0 {
289289
// Invalid hostport.
290-
return
290+
return host, port
291291
}
292292
if i := strings.LastIndex(hostport[addrEnd:], ":"); i < 0 {
293293
host = hostport[1:addrEnd]
294-
return
294+
return host, port
295295
}
296296
} else {
297297
if i := strings.LastIndex(hostport, ":"); i < 0 {
298298
host = hostport
299-
return
299+
return host, port
300300
}
301301
}
302302

303303
host, pStr, err := net.SplitHostPort(hostport)
304304
if err != nil {
305-
return
305+
return host, port
306306
}
307307

308308
p, err := strconv.ParseUint(pStr, 10, 16)
309309
if err != nil {
310-
return
310+
return host, port
311311
}
312312
return host, int(p) // nolint: gosec // Bit size of 16 checked above.
313313
}

0 commit comments

Comments
 (0)