function 'getNotRunningPodLogs' seems to be a getter but it does not return any result
336 return pods.Items
337}
338
339func getNotRunningPodLogs() {340 events, _ := kubeClient.CoreV1().Events(namespace).List(context.TODO(), metav1.ListOptions{FieldSelector: "status.phase!=Running", TypeMeta: metav1.TypeMeta{Kind: "Pod"}})
341 for _, item := range events.Items {
342 fmt.Println(item)
Description
Typically, functions with names prefixed with Get are supposed to return a value.
Bad practice
func GetData(n int) {
fmt.Println(10 - n)
}
Recommended
func GetData(n int) int {
fmt.Println(10 - n)
return 10 - n
}