Skip to content

goformat does not understand template arguments #2

Description

@fskypro

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)
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions