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
That's because goformat doesn't know anything about this syntax because it was added after the last sync with upstream gofmt. I haven't used Go in years, so I'm not going to do this sync anytime soon. Maybe you want to try it. There is a script get-upstream-changes that helps with this.
mbenkmann
changed the title
the template argument weill be removed as bellow
goformat does not understand template arguments
Jul 8, 2023
func BoolToNumber[T T_Number](v bool) T {
if v {
return T(1)
}
return T(0)
}
when run goformat commant, it will be changed to:
func BoolToNumber(v bool) T {
if v {
return T(1)
}
return T(0)
}
The text was updated successfully, but these errors were encountered: