(value any)
| 2030 | } |
| 2031 | |
| 2032 | func findContextLimitValue(value any) (int64, bool) { |
| 2033 | var ( |
| 2034 | limit int64 |
| 2035 | found bool |
| 2036 | ) |
| 2037 | |
| 2038 | collectContextLimitValues(value, func(candidate int64) { |
| 2039 | if !found || candidate > limit { |
| 2040 | limit = candidate |
| 2041 | found = true |
| 2042 | } |
| 2043 | }) |
| 2044 | |
| 2045 | return limit, found |
| 2046 | } |
| 2047 | |
| 2048 | func collectContextLimitValues(value any, onValue func(int64)) { |
| 2049 | switch typed := value.(type) { |