From 24b5e6d39edddcd0812a1230a1e126c3586c6bf5 Mon Sep 17 00:00:00 2001 From: Kelvin Clement Mwinuka Date: Wed, 1 May 2024 17:39:49 +0800 Subject: [PATCH] Renamed LoadModules and UnloadModules to LoadModule and UnloadModule respectively because they both deal with one module at a time. --- echovault/plugin.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/echovault/plugin.go b/echovault/plugin.go index fa98301..846b01f 100644 --- a/echovault/plugin.go +++ b/echovault/plugin.go @@ -9,7 +9,7 @@ import ( "strings" ) -func (server *EchoVault) LoadModules(path string, args ...string) error { +func (server *EchoVault) LoadModule(path string, args ...string) error { p, err := plugin.Open(path) if err != nil { return err @@ -125,7 +125,7 @@ func (server *EchoVault) LoadModules(path string, args ...string) error { return nil } -func (server *EchoVault) UnloadModules(module string) { +func (server *EchoVault) UnloadModule(module string) { server.commands = slices.DeleteFunc(server.commands, func(command internal.Command) bool { return strings.EqualFold(command.Module, module) })