Instead of creating a specific type for every element in the structre, we use use a anonymous structure and define only the fields we're intrested in. In our example we'd like to see the symbols most mentioned for a given symbol (in our case AAPL). And the output:
$ go run stocktwits.go
SPY 10
TSLA 7
AMZN 5
BTC.X 5
TVIX 2
No comments:
Post a Comment