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
Would you be interested in having a compare typewriter?
This would basically just compare each field for a type from top to bottom.
When a field is found with a compare != 0 then that value is returned.
Here is some example generated code.
func (this *MyType) Compare(that *MyType) int {
if this.Field1 != that.Field1 {
if this.Field1 < that.Field1 {
return -1
}
return 1
}
if c := bytes.Compare(this.Field2, that.Field2); c != 0 {
return c
}
if c := this.Field3.Compare(that.Field3); c != 0 {
return c
}
return 0
}
Would you be interested in such a pull request?
The text was updated successfully, but these errors were encountered:
Hi
Would you be interested in having a compare typewriter?
This would basically just compare each field for a type from top to bottom.
When a field is found with a compare != 0 then that value is returned.
Here is some example generated code.
Would you be interested in such a pull request?
The text was updated successfully, but these errors were encountered: