MCPcopy
hub / github.com/apecloud/kubeblocks / buildDescriptionFormatter

Function buildDescriptionFormatter

controllers/trace/util.go:589–595  ·  view source on GitHub ↗
(i18nResources *corev1.ConfigMap, defaultLocale string, locale *string)

Source from the content-addressed store, hash-verified

587}
588
589func buildDescriptionFormatter(i18nResources *corev1.ConfigMap, defaultLocale string, locale *string) func(client.Object, client.Object, tracev1.ObjectChangeType, *schema.GroupVersionKind) (string, *string) {
590 return func(oldObj client.Object, newObj client.Object, changeType tracev1.ObjectChangeType, gvk *schema.GroupVersionKind) (string, *string) {
591 description := formatDescription(oldObj, newObj, changeType, gvk, i18nResources, &defaultLocale)
592 localDescription := formatDescription(oldObj, newObj, changeType, gvk, i18nResources, locale)
593 return *description, localDescription
594 }
595}
596
597func formatDescription(oldObj, newObj client.Object, changeType tracev1.ObjectChangeType, gvk *schema.GroupVersionKind, i18nResource *corev1.ConfigMap, locale *string) *string {
598 if locale == nil {

Callers 6

util_test.goFile · 0.85
ReconcileMethod · 0.85
ReconcileMethod · 0.85
ReconcileMethod · 0.85

Calls 1

formatDescriptionFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…