diff --git a/stdlib/go1_21_plugin.go b/stdlib/go1_21_plugin.go new file mode 100644 index 00000000..083758c6 --- /dev/null +++ b/stdlib/go1_21_plugin.go @@ -0,0 +1,30 @@ +// Code generated by 'yaegi extract plugin'. DO NOT EDIT. + +//go:build go1.21 && !go1.22 +// +build go1.21,!go1.22 + +package stdlib + +import ( + "plugin" + "reflect" +) + +func init() { + Symbols["plugin/plugin"] = map[string]reflect.Value{ + // function, constant and variable definitions + "Open": reflect.ValueOf(plugin.Open), + + // type definitions + "Plugin": reflect.ValueOf((*plugin.Plugin)(nil)), + "Symbol": reflect.ValueOf((*plugin.Symbol)(nil)), + + // interface wrapper definitions + "_Symbol": reflect.ValueOf((*_plugin_Symbol)(nil)), + } +} + +// _plugin_Symbol is an interface wrapper for Symbol type +type _plugin_Symbol struct { + IValue interface{} +} diff --git a/stdlib/go1_22_plugin.go b/stdlib/go1_22_plugin.go new file mode 100644 index 00000000..2c425e86 --- /dev/null +++ b/stdlib/go1_22_plugin.go @@ -0,0 +1,30 @@ +// Code generated by 'yaegi extract plugin'. DO NOT EDIT. + +//go:build go1.22 +// +build go1.22 + +package stdlib + +import ( + "plugin" + "reflect" +) + +func init() { + Symbols["plugin/plugin"] = map[string]reflect.Value{ + // function, constant and variable definitions + "Open": reflect.ValueOf(plugin.Open), + + // type definitions + "Plugin": reflect.ValueOf((*plugin.Plugin)(nil)), + "Symbol": reflect.ValueOf((*plugin.Symbol)(nil)), + + // interface wrapper definitions + "_Symbol": reflect.ValueOf((*_plugin_Symbol)(nil)), + } +} + +// _plugin_Symbol is an interface wrapper for Symbol type +type _plugin_Symbol struct { + IValue interface{} +} diff --git a/stdlib/stdlib.go b/stdlib/stdlib.go index e617a49d..dbfa321b 100644 --- a/stdlib/stdlib.go +++ b/stdlib/stdlib.go @@ -57,3 +57,4 @@ func init() { //go:generate ../internal/cmd/extract/extract testing testing/fstest testing/iotest testing/quick testing/slogtest //go:generate ../internal/cmd/extract/extract text/scanner text/tabwriter text/template text/template/parse //go:generate ../internal/cmd/extract/extract time unicode unicode/utf16 unicode/utf8 +//go:generate ../internal/cmd/extract/extract plugin