mirror of
				https://github.com/taigrr/wtf
				synced 2025-01-18 04:03:14 -08:00 
			
		
		
		
	
		
			
				
	
	
		
			29 lines
		
	
	
		
			511 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			29 lines
		
	
	
		
			511 B
		
	
	
	
		
			Go
		
	
	
	
	
	
package price
 | 
						|
 | 
						|
type list struct {
 | 
						|
	items []*fromCurrency
 | 
						|
}
 | 
						|
 | 
						|
type fromCurrency struct {
 | 
						|
	name        string
 | 
						|
	displayName string
 | 
						|
	to          []*toCurrency
 | 
						|
}
 | 
						|
 | 
						|
type toCurrency struct {
 | 
						|
	name  string
 | 
						|
	price float32
 | 
						|
}
 | 
						|
 | 
						|
type cResponse map[string]float32
 | 
						|
 | 
						|
/* -------------------- Unexported Functions -------------------- */
 | 
						|
 | 
						|
func (l *list) addItem(name string, displayName string, to []*toCurrency) {
 | 
						|
	l.items = append(l.items, &fromCurrency{
 | 
						|
		name:        name,
 | 
						|
		displayName: displayName,
 | 
						|
		to:          to,
 | 
						|
	})
 | 
						|
}
 |