Set sets the value of the include with the provided key to the provided value. If the include already exists, its value is updated. If the include does not exist, it is created.
(key string, value *Include)
| 76 | // value. If the include already exists, its value is updated. If the include |
| 77 | // does not exist, it is created. |
| 78 | func (includes *Includes) Set(key string, value *Include) bool { |
| 79 | if includes == nil { |
| 80 | includes = NewIncludes() |
| 81 | } |
| 82 | if includes.om == nil { |
| 83 | includes.om = orderedmap.NewOrderedMap[string, *Include]() |
| 84 | } |
| 85 | defer includes.mutex.Unlock() |
| 86 | includes.mutex.Lock() |
| 87 | return includes.om.Set(key, value) |
| 88 | } |
| 89 | |
| 90 | // All returns an iterator that loops over all task key-value pairs. |
| 91 | // Range calls the provided function for each include in the map. The function |
no test coverage detected