Add logout (#13796)

### What problem does this PR solve?

Add command: logout

### Type of change

- [x] New Feature (non-breaking change which adds functionality)

Signed-off-by: Jin Hai <haijin.chn@gmail.com>
This commit is contained in:
Jin Hai
2026-03-26 11:54:23 +08:00
committed by GitHub
parent ebf36950e4
commit e705ac6643
8 changed files with 98 additions and 32 deletions

View File

@ -27,6 +27,16 @@ func (p *Parser) parseAdminLoginUser() (*Command, error) {
return cmd, nil
}
func (p *Parser) parseAdminLogout() (*Command, error) {
cmd := NewCommand("logout")
p.nextToken()
// Semicolon is optional for UNSET TOKEN
if p.curToken.Type == TokenSemicolon {
p.nextToken()
}
return cmd, nil
}
func (p *Parser) parseAdminPingServer() (*Command, error) {
cmd := NewCommand("ping")
p.nextToken()