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" } }