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
package fractionpb
import (
"github.com/tableauio/tableau/proto/wellknownpb"
)
// New creates a new fraction.funcNew(num, denint32) *tableaupb.Fraction {
return&tableaupb.Fraction{Num: num, Den: den}
}
// NewInteger creates a new special fraction: integer. When a fraction has a denominator// of 1 (e.g.: a/1), it is referred to as a whole number or an integer.funcNewInteger(numint32) *tableaupb.Fraction {
returnNew(num, 1)
}
// NewComparator creates a new fraction comparator.funcNewComparator(sign tableaupb.Comparator_Sign, num, denint32) *tableaupb.Comparator {
return&tableaupb.Comparator{
Sign: sign,
Value: New(num, den),
}
}
See https://github.com/protocolbuffers/protobuf-go/blob/master/types/known/timestamppb/timestamp.pb.go
For encapsulating common util functions, such as:
The text was updated successfully, but these errors were encountered: