You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have Java background , in springboot there is a interface named InitializingBean this interface give an opportunity to do some one-time initialization. We can introduce similar interface, service implement this interface will call the method automatically once after the service creation.
The text was updated successfully, but these errors were encountered:
I think there is a bit difference between init() method and the case I describe. as go init() is package level and too many init method in a package is not a good practice(my opinion). my case is somelike "constructor" behavior, it should be called by the framework right after the service creation. not sure I address the case well or not.
I have Java background , in springboot there is a interface named InitializingBean this interface give an opportunity to do some one-time initialization. We can introduce similar interface, service implement this interface will call the method automatically once after the service creation.
The text was updated successfully, but these errors were encountered: