aboutsummaryrefslogtreecommitdiff
path: root/src/plugin
diff options
context:
space:
mode:
authorDavid Crawshaw <crawshaw@golang.org>2016-10-19 11:06:36 -0400
committerDavid Crawshaw <crawshaw@golang.org>2016-10-19 17:24:19 +0000
commit13c65723419a41a8b5339e11f40fe2ecf0bbc8ab (patch)
tree35eb39ea5e8bf6141d1801ea48944e9311afa351 /src/plugin
parent023bb034e93363492ef444fefcb1d38cdc61ede1 (diff)
downloadgo-13c65723419a41a8b5339e11f40fe2ecf0bbc8ab.tar.gz
go-13c65723419a41a8b5339e11f40fe2ecf0bbc8ab.zip
plugin: mention OS X support and concurrency
Change-Id: I4270bf81511a5bf80ed146f5e66e4f8aeede2aa2 Reviewed-on: https://go-review.googlesource.com/31463 Reviewed-by: Ian Lance Taylor <iant@golang.org>
Diffstat (limited to 'src/plugin')
-rw-r--r--src/plugin/plugin.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/plugin/plugin.go b/src/plugin/plugin.go
index 66cf2f98d4..93ae23f3f1 100644
--- a/src/plugin/plugin.go
+++ b/src/plugin/plugin.go
@@ -4,7 +4,7 @@
// Package plugin implements loading and symbol resolution of Go plugins.
//
-// Currently plugins only work on Linux.
+// Currently plugins only work on Linux and Darwin.
//
// A plugin is a Go main package with exported functions and variables that
// has been built with:
@@ -24,6 +24,8 @@ type Plugin struct {
}
// Open opens a Go plugin.
+// If a path has already been opened, then the existing *Plugin is returned.
+// It is safe for concurrent use by multiple goroutines.
func Open(path string) (*Plugin, error) {
return open(path)
}
@@ -31,6 +33,7 @@ func Open(path string) (*Plugin, error) {
// Lookup searches for a symbol named symName in plugin p.
// A symbol is any exported variable or function.
// It reports an error if the symbol is not found.
+// It is safe for concurrent use by multiple goroutines.
func (p *Plugin) Lookup(symName string) (Symbol, error) {
return lookup(p, symName)
}