Go: refactor config (#17678)

Signed-off-by: Jin Hai <haijin.chn@gmail.com>
This commit is contained in:
Jin Hai
2026-08-01 22:06:56 +08:00
committed by GitHub
parent 26a5af8b83
commit f621b4c7b4
20 changed files with 302 additions and 1027 deletions

View File

@@ -129,8 +129,6 @@ func (p *Parser) parseAPIListCommands() (*Command, error) {
p.nextToken() // consume LIST
switch p.curToken.Type {
case TokenConfigs:
return p.parseAPIListConfigs()
case TokenDatasets:
return p.parseAPIListDatasets()
case TokenDataset:
@@ -168,17 +166,6 @@ func (p *Parser) parseAPIListCommands() (*Command, error) {
}
}
// LIST CONFIGS;
func (p *Parser) parseAPIListConfigs() (*Command, error) {
p.nextToken()
// Semicolon is optional
if p.curToken.Type == TokenSemicolon {
p.nextToken()
}
return NewCommand("api_list_configs"), nil
}
func (p *Parser) parseAPIListDatasets() (*Command, error) {
cmd := NewCommand("api_list_datasets")
p.nextToken() // consume DATASETS