Find the size needed for the Kind column when listing activations
(activations []whisk.Activation)
| 413 | |
| 414 | // Find the size needed for the Kind column when listing activations |
| 415 | func getLargestKindSize(activations []whisk.Activation) int { |
| 416 | var maxLen = 0 |
| 417 | var curLen int |
| 418 | var kind interface{} |
| 419 | |
| 420 | for i := 0; i < len(activations); i++ { |
| 421 | kind = activations[i].Annotations.GetValue("kind") |
| 422 | if kind == nil { |
| 423 | kind = "unknown" |
| 424 | } |
| 425 | curLen = len(kind.(string)) |
| 426 | if curLen > maxLen { |
| 427 | maxLen = curLen |
| 428 | } |
| 429 | } |
| 430 | return maxLen |
| 431 | } |
| 432 | |
| 433 | // Find the size needed for the Status column when listing activations |
| 434 | func getLargestStatusSize(activations []whisk.Activation) int { |