github.com/rclone/rclone@v1.66.1-0.20240517100346-7b89735ae726/lib/plugin/package.go (about) 1 // Package plugin implements loading out-of-tree storage backends 2 // using https://golang.org/pkg/plugin/ on Linux and macOS. 3 // 4 // If the $RCLONE_PLUGIN_PATH is present, any Go plugins in that dir 5 // named like librcloneplugin_NAME.so will be loaded. 6 // 7 // To create a plugin, write the backend package like it was in-tree 8 // but set the package name to "main". Then, build the plugin with 9 // 10 // go build -buildmode=plugin -o librcloneplugin_NAME.so 11 // 12 // where NAME equals the plugin's fs.RegInfo.Name. 13 package plugin 14 15 // Build for plugin for unsupported platforms to stop go complaining 16 // about "no buildable Go source files".