| khenaidoo | ac63710 | 2019-01-14 15:44:34 -0500 | [diff] [blame] | 1 | package ordered_map |
| 2 | |||||
| 3 | import "fmt" | ||||
| 4 | |||||
| 5 | type KVPair struct { | ||||
| 6 | Key interface{} | ||||
| 7 | Value interface{} | ||||
| 8 | } | ||||
| 9 | |||||
| 10 | func (k *KVPair) String() string { | ||||
| 11 | return fmt.Sprintf("%v:%v", k.Key, k.Value) | ||||
| 12 | } | ||||
| 13 | |||||
| 14 | func (kv1 *KVPair) Compare(kv2 *KVPair) bool { | ||||
| 15 | return kv1.Key == kv2.Key && kv1.Value == kv2.Value | ||||
| 16 | } | ||||