How to use plugin package to do livereload?

42 views
Skip to first unread message

aihui zhu

unread,
Apr 15, 2020, 8:02:17 PM4/15/20
to golang-nuts
my program and plugin shares some common package, i'm temporarily copy the plugin's main package to main_$timestamp, 
so i can avoid same pluginpath and load it many times.

but it doesn't works for some problems:
if i changes only structure method, because of type equal, the runtime still refers to the old type, the new function will never be run.
if i change the structure members, the plugin was failed to load for error 'plugin was built with a different version'

i'm thinking another way: could i change the plugin's module name to module_$timestamp before go build, so the plugin doesn't shares package with main program?
Reply all
Reply to author
Forward
0 new messages