像golang中的java这样的动态包加载

How Will I import package dynamically and invoke its method in golang like java reflection package, there are solutions of how to invoke method in the same file using golang reflection but what about invoking from different package

What you're describing isn't dynamic package loading, it's just reflection. As long as the package is included in the binary and the types are exported, you can reference it the same way you can reference types in the same package.

Dynamic package loading is a different matter entirely; there's the new plugin support, which is still in its early stages, and not yet supported on all platforms. That's the closest you'll get.

Bear in mind that Go is not Java. Don't try to write Java in Go. It won't work. The platform, language, and standard library are very, very, very different between the two. Java can do dynamic class loading because it has a class loader. All types are dynamically loaded in Java. In Go, nothing is dynamically loaded; the Go compiler produces a native binary, there's nothing dynamic about it.

If you're trying to replicate something you're used to in Java, you're probably best served by rethinking your design entirely in a way that's more suitable to the technology you've chosen (Go), or to choose a technology more suited to the problem you're trying to solve.