Documentation ¶
Overview ¶
Package lottery math/rand based lottery library.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Interface ¶
type Interface interface {
Prob() int
}
Interface provide an interface to handle multiple lottery object.
type Lottery ¶
type Lottery interface { Lot(prob int) bool LotOf(prob int, totalProb int) bool Lots(lots ...Interface) int }
Lottery math/rand wrapper.
type MockInterface ¶
type MockInterface struct {
// contains filtered or unexported fields
}
Mock of Interface interface
func NewMockInterface ¶
func NewMockInterface(ctrl *gomock.Controller) *MockInterface
func (*MockInterface) EXPECT ¶
func (_m *MockInterface) EXPECT() *_MockInterfaceRecorder
func (*MockInterface) Prob ¶
func (_m *MockInterface) Prob() int
type MockLottery ¶
type MockLottery struct {
// contains filtered or unexported fields
}
Mock of Lottery interface
func NewMockLottery ¶
func NewMockLottery(ctrl *gomock.Controller) *MockLottery
func (*MockLottery) EXPECT ¶
func (_m *MockLottery) EXPECT() *_MockLotteryRecorder
func (*MockLottery) Lot ¶
func (_m *MockLottery) Lot(prob int) bool
func (*MockLottery) Lots ¶
func (_m *MockLottery) Lots(lots ...Interface) int
Click to show internal directories.
Click to hide internal directories.