Execute a script from mongo-go-driver?

Hello,
Is it possible to run mongo js scripts written as strings via the mongo-go-driver?
I’d like to write some scripts in dedicated files, and execute them via the driver to manage the authentication etc… But I don’t figured out a way to do this :slight_smile:

Thanks in advance!

I don’t think there is a built-in mechanism to do this. Even I am looking for this feature and didn’t find a way.

Your only option is to write a custom function yourself.

P.S. Let me know if you find any easy way to do it.