This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
123,124c123,129 | |
< if reflect.DeepEqual(p.DoubleSet[i], p.DoubleSet[j]) { | |
< return thrift.PrependError("", fmt.Errorf("%T error writing set field: slice is not unique", p.DoubleSet[i])) | |
--- | |
> if !func(tgt, src float64) bool { | |
> if tgt != src { | |
> return false | |
> } | |
> return true | |
> }(p.DoubleSet[i], p.DoubleSet[j]) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func (p *Simple) writeField1(ctx context.Context, oprot thrift.TProtocol) (err error) { | |
if err := oprot.WriteFieldBegin(ctx, "DoubleSet", thrift.SET, 1); err != nil { | |
return thrift.PrependError(fmt.Sprintf("%T write field begin error 1:DoubleSet: ", p), err) | |
} | |
if err := oprot.WriteSetBegin(ctx, thrift.DOUBLE, len(p.DoubleSet)); err != nil { | |
return thrift.PrependError("error writing set begin: ", err) | |
} | |
for i := 0; i < len(p.DoubleSet); i++ { | |
for j := i + 1; j < len(p.DoubleSet); j++ { | |
if !func(tgt, src float64) bool { |