Contains implements the traits.Container interface.
(index ref.Val)
| 89 | |
| 90 | // Contains implements the traits.Container interface. |
| 91 | func (r ResourceList) Contains(index ref.Val) ref.Val { |
| 92 | key, ok := index.(types.String) |
| 93 | if !ok { |
| 94 | return types.MaybeNoSuchOverloadErr(index) |
| 95 | } |
| 96 | _, found := r.List[corev1.ResourceName(key)] |
| 97 | return types.Bool(found) |
| 98 | } |
| 99 | |
| 100 | // Get implements the traits.Indexer interface. |
| 101 | func (r ResourceList) Get(index ref.Val) ref.Val { |
no outgoing calls