kitarp29 / kube-ez

This is a simple k8s-api project. It is built on Golang and utilises the client-go library to interact with Kubernetes Cluster. It is a plug and play solution and can be used to create a k8s-api server.
MIT License
74 stars 12 forks source link

Adding recover() in codebase #37

Closed kitarp29 closed 1 year ago

kitarp29 commented 1 year ago

Just learnt about a great in-built function in Go that handles panic situation. It will be an easy issue. I will post more details once I get back home from office 👍

kitarp29 commented 1 year ago

Reference to the doc: Here

Not even sure if I am using panic in the codebase it has been sometime. Will look into it and apply it! Others are welcome to do it too!

kitarp29 commented 1 year ago

I see that I have used it plenty number of times in api.go and install.go. The logger will take care of the format of the log, just call the same way with the recover function

kitarp29 commented 1 year ago

Fixed ✅ image