Simple Go Plugin to add a header
go build -buildmode=plugin -o addheader.so ./addheader/addheader.go
copy the generated .so file to plugin-host/ directory.
go build -o plugin-host
./plugin-host
go mod tidy go build -o bin/addheader ./plugins/addheader go build -o bin/removeheader ./plugins/removeheader go build -o bin/host ./host
cd bin ./host
go work sync
go build -o plugins/addheader/addheader ./plugins/addheader go build -o plugins/removeheader/removeheader ./plugins/removeheader
add the generated plugins to host/plugins directory
go build -o host ./host
./host
go mod tidy
go run host/main.go
cd plugins/addheader go build -o ../../bin/addheader cd ../removeheader go build -o ../../bin/removeheader cd ../addremoveheader go build -o ../../bin/addremoveheader
cd ../../host go build -o host
cd ../../host ./host