package
0.0.0-20250206101203-bd6683890685
Repository: https://github.com/dockerian/go-coding.git
Documentation: pkg.go.dev

# Functions

ByStockID returns a ByStock / Less function of sort.Interface.
ByStockPrice returns a ByStock / Less function of sort.Interface.
NewStock builds a stock.

# Constants

MAXSTACK is the maximum stacks allowed for a stack.
STACKSIZE is the number of stocks in one stack.
STOCKAMOUNT is the default number of stocks.

# Structs

BuyingStock struct.
Exchange struct.
Market struct.
Stock struct represents exchangeable stock - assuming same price for buying and selling - assuming stack is always the same (for simplicity) - note: for varied stack, see GetUnitPriceByBoughtAmount.

# Interfaces

Buyer interface.

# Type aliases

Buying struct.
ByStock is type of func as Less of sort.Interface.