~int в определении type constraint?Тильда ~ означает "тип с таким же underlying type". ~int допускает int и любые типы вида type MyInt int. Без тильды допустим только точный тип int.
type Integer interface{ ~int | ~int64 }
type MyInt int
func F[T Integer](x T) T { return x }
F(MyInt(1)) // допустимо с ~int