I have a grpc application, which has a dependency on one of my libraries. I want to execute some library code without explicitly invoking any library function at application startup. The library connects to some external dependencies and I want to be able to check if those dependencies are availbale at startup, so that application does not run into an error at later time.

afaik init() will not help here since it runs first for a package which is imported in application.This library has 3 packages (P1,P2,P3), all of which use another common package (V) which does the 3rd party dependency check. I do not want to write init() in all 3 packages