You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

23 lines
316 B

package types
type Side int32
const (
SideBuy Side = 1 // BUY
SideSell Side = 2 // SELL
)
func (side Side) IsValid() bool {
return side == SideBuy || side == SideSell
}
func (side Side) String() string {
switch side {
default:
return ""
case SideBuy:
return "BUY"
case SideSell:
return "SELL"
}
}