MCPcopy Create free account
hub / github.com/apache/openwhisk-cli / getLargestKindSize

Function getLargestKindSize

commands/activation.go:415–431  ·  view source on GitHub ↗

Find the size needed for the Kind column when listing activations

(activations []whisk.Activation)

Source from the content-addressed store, hash-verified

413
414// Find the size needed for the Kind column when listing activations
415func 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
434func getLargestStatusSize(activations []whisk.Activation) int {

Callers 1

activation.goFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected