Skip to content

Commit

Permalink
add pointer to doc and a few more caveats about cgo etc
Browse files Browse the repository at this point in the history
  • Loading branch information
ldemailly committed Jan 26, 2024
1 parent 95232d4 commit 82f49d3
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
12 changes: 9 additions & 3 deletions plugin_example/Makefile
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@

demo: plugin/plugin.so
go run .
run-demo: demo
./demo

demo: *.go plugin/plugin.so
go build -o demo .
go version -m ./demo


plugin/plugin.so:
make -C plugin


clean:
rm demo plugin/plugin.so
3 changes: 3 additions & 0 deletions plugin_example/extensible_main.go
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
// Basic demo of dynamic code loading using https://pkg.go.dev/plugin
// requires cgo enabled build.

package main

import (
Expand Down
1 change: 1 addition & 0 deletions plugin_example/plugin/Makefile
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

plugin.so: plugin.go
go build -buildmode=plugin -o plugin.so plugin.go
go version -m ./plugin.so

0 comments on commit 82f49d3

Please sign in to comment.