alfred/command/command.go
2026-03-28 19:27:32 +08:00

25 lines
546 B
Go

package command
import (
"gitea.micah.wiki/pandora/alfred/command/code"
"gitea.micah.wiki/pandora/alfred/command/datex"
"gitea.micah.wiki/pandora/alfred/command/gourl"
"gitea.micah.wiki/pandora/alfred/command/help"
"gitea.micah.wiki/pandora/alfred/model"
)
func Do(command string, args []string) []*model.Item {
switch command {
case "date":
return datex.Do(args)
case "url", "go":
return gourl.Do(args)
case "encode":
return code.EncodeDo(args)
case "decode":
return code.DecodeDo(args)
default:
return help.Do(args)
}
}