AppendHelpers takes care of only appending helper functions from newH that are not already in oldH.
(oldH, newH []*TransformFunctionData)
| 155 | // AppendHelpers takes care of only appending helper functions from newH that |
| 156 | // are not already in oldH. |
| 157 | func AppendHelpers(oldH, newH []*TransformFunctionData) []*TransformFunctionData { |
| 158 | for _, h := range newH { |
| 159 | found := false |
| 160 | for _, h2 := range oldH { |
| 161 | if h.Name == h2.Name { |
| 162 | found = true |
| 163 | break |
| 164 | } |
| 165 | } |
| 166 | if !found { |
| 167 | oldH = append(oldH, h) |
| 168 | } |
| 169 | } |
| 170 | return oldH |
| 171 | } |
| 172 | |
| 173 | // MapDepth returns the level of nested maps. For unnested maps, it returns 0. |
| 174 | func MapDepth(m *expr.Map) int { |
no outgoing calls
no test coverage detected