You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
--- a 2022-06-19 16:24:24.237245879 +0000+++ b 2022-06-19 16:25:48.403318940 +0000@@ -1,7 +1,8 @@
func SortedKeys[K interface {
comparable
constraints.Ordered
-}, V any](m map[K]V) []K {+}, V any](m map[K]V,+) []K {
keys := maps.Keys(m)
slices.Sort(keys)
return keys
I did not expect the function arguments to be split over two lines. I'm only starting to learn generics, so this might however be idiomatic. Please do close this issue if it is invalid.
The text was updated successfully, but these errors were encountered:
This rule was tested before the introduction of generics, so my best guess is that this is unintended :) Have you tried the latest master version as well, to see if the same problem occurs?
Given the following code (
constraints
,slices
, andmaps
are thegolang.org/x/exp
packages of the same name):gofumpt@latest
(900c61a) reformats this to:which has this diff:
I did not expect the function arguments to be split over two lines. I'm only starting to learn generics, so this might however be idiomatic. Please do close this issue if it is invalid.
The text was updated successfully, but these errors were encountered: