(a, b Value)
| 393 | } |
| 394 | |
| 395 | func compareValues(a, b Value) int { |
| 396 | if a.Type == workflowapi.String || b.Type == workflowapi.String { |
| 397 | as, bs := a.AsString(), b.AsString() |
| 398 | if as < bs { |
| 399 | return -1 |
| 400 | } |
| 401 | if as > bs { |
| 402 | return 1 |
| 403 | } |
| 404 | return 0 |
| 405 | } |
| 406 | af, bf := a.AsFloat(), b.AsFloat() |
| 407 | if af < bf { |
| 408 | return -1 |
| 409 | } |
| 410 | if af > bf { |
| 411 | return 1 |
| 412 | } |
| 413 | return 0 |
| 414 | } |
no test coverage detected