generator: added check for *.so extension

This commit is contained in:
David Allen 2024-12-10 15:09:13 -07:00
parent 9cef01acf3
commit c8aa4aae93
Signed by: towk
GPG key ID: 793B2924A49B3A3F

View file

@ -130,6 +130,11 @@ func LoadPlugins(dirpath string, opts ...Option) (map[string]Generator, error) {
return nil return nil
} }
// only try loading if file has .so extension
if filepath.Ext(path) != ".so" {
return nil
}
// load the generator plugin from current path // load the generator plugin from current path
gen, err := LoadPlugin(path) gen, err := LoadPlugin(path)
if err != nil { if err != nil {