This is what I have been doing and it has worked for my needs: ``` // Importing it using "require" and storing the module in a variable core := js.Global().Call("require", "@boostercloud/framework-core")
// Now get some props/methods from that module as usual: config := core.Get("Booster").Get("config") ``` Is this what you were asking about? El martes, 29 de septiembre de 2020 a las 9:13:03 UTC+1, eduard....@gmail.com escribió: > In JavaScript we can import > <https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import> > > JavaScript modules statically and dynamically. How could we import a > JavaScript module dynamically in Go? > > The closest/simplest thing may be to add an HTML script tag into the page > header programatically (and I'm going to try that) but maybe there is a > more obvious way that I'm not seeing. > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/af259e26-67b2-495f-84a9-7af3c0afe763n%40googlegroups.com.