mirror of
https://github.com/EchoVault/SugarDB.git
synced 2025-10-20 06:44:45 +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"
|
||||
)
|
||||
|
||||
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)
|
||||
})
|
||||
|
Reference in New Issue
Block a user