Renamed LoadModules and UnloadModules to LoadModule and UnloadModule respectively because they both deal with one module at a time.

This commit is contained in:
Kelvin Clement Mwinuka
2024-05-01 17:39:49 +08:00
parent 8aed3a320d
commit 24b5e6d39e

View File

@@ -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)
})