github.com/wtfutil/wtf@v0.43.0/modules/cryptocurrency/cryptolive/price/price.go (about) 1 package price 2 3 type list struct { 4 items []*fromCurrency 5 } 6 7 type fromCurrency struct { 8 name string 9 displayName string 10 to []*toCurrency 11 } 12 13 type toCurrency struct { 14 name string 15 price float32 16 } 17 18 type cResponse map[string]float32 19 20 /* -------------------- Unexported Functions -------------------- */ 21 22 func (l *list) addItem(name string, displayName string, to []*toCurrency) { 23 l.items = append(l.items, &fromCurrency{ 24 name: name, 25 displayName: displayName, 26 to: to, 27 }) 28 }