mirror of
https://github.com/EchoVault/SugarDB.git
synced 2025-10-21 06:59:24 +08:00
Renamed LoadModules and UnloadModules to LoadModule and UnloadModule respectively because they both deal with one module at a time.
This commit is contained in:
@@ -9,7 +9,7 @@ import (
|
|||||||
"strings"
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (server *EchoVault) LoadModules(path string, args ...string) error {
|
func (server *EchoVault) LoadModule(path string, args ...string) error {
|
||||||
p, err := plugin.Open(path)
|
p, err := plugin.Open(path)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
@@ -125,7 +125,7 @@ func (server *EchoVault) LoadModules(path string, args ...string) error {
|
|||||||
return nil
|
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 {
|
server.commands = slices.DeleteFunc(server.commands, func(command internal.Command) bool {
|
||||||
return strings.EqualFold(command.Module, module)
|
return strings.EqualFold(command.Module, module)
|
||||||
})
|
})
|
||||||
|
Reference in New Issue
Block a user