The Go Language Module for Plugify enables developers to write plugins in Go for the Plugify framework. This module provides a seamless integration for Go plugins, allowing them to be dynamically loaded and managed by the Plugify core.
- Go Plugin Support: Write your plugins in Go and integrate them effortlessly with the Plugify framework.
- Automatic Exporting: Easily export and import methods between plugins and the language module.
- Initialization and Cleanup: Handle plugin initialization, startup, and cleanup with dedicated module events.
- Interoperability: Communicate with plugins written in other languages through auto-generated interfaces.
- Go Compiler
- Plugify Framework Installed
You can install the C++ Language Module using the Plugify plugin manager by running the following command:
plg install plugify-module-golang
-
Clone this repository:
git clone https://github.com/untrustedmodders/plugify-module-golang.git --recursive cd plugify-module-golang
-
Build the Go language module:
mkdir build && cd build cmake .. cmake --build .
-
Integration with Plugify
Ensure that your Go language module is available in the same directory as your Plugify setup.
-
Write Go Plugins
Develop your plugins in Go using the Plugify Go API. Refer to the Plugify Go Plugin Guide for detailed instructions.
-
Build and Install Plugins
Compile your Go plugins and place the shared libraries in a directory accessible to the Plugify core.
-
Run Plugify
Start the Plugify framework, and it will dynamically load your Go plugins.
go mod init example.com/my-go-plugin
Note that you need to include the v in the version tag.
go get github.com/untrustedmodders/go-plugify@v1.0.0
package main
import (
"fmt"
"github.com/untrustedmodders/go-plugify"
)
func init() {
plugify.OnPluginStart(func() {
fmt.Println("OnPluginStart")
})
plugify.OnPluginEnd(func() {
fmt.Println("OnPluginEnd")
})
}
func main() {}
For comprehensive documentation on writing plugins in Go using the Plugify framework, refer to the Plugify Documentation.
Feel free to contribute by opening issues or submitting pull requests. We welcome your feedback and ideas!
This Go Language Module for Plugify is licensed under the MIT License.