mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-08-05 15:20:30 +08:00
Go: refactor config (#17678)
Signed-off-by: Jin Hai <haijin.chn@gmail.com>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user