Go: add context to lots of interface (#17253)

Signed-off-by: Jin Hai <haijin.chn@gmail.com>
This commit is contained in:
Jin Hai
2026-07-22 22:30:57 +08:00
committed by GitHub
parent b3d394954d
commit d19a036cda
221 changed files with 3215 additions and 2337 deletions

View File

@@ -18,6 +18,7 @@ package cli
import (
"bufio"
"context"
"encoding/base64"
"encoding/json"
"errors"
@@ -3558,7 +3559,8 @@ func (c *CLI) APIParseLocalFileCommand(cmd *Command) (ResponseIf, error) {
return nil, fmt.Errorf("failed to read dsl file: %w", err)
}
parseResult := fileParser.ParseWithResult(filename, fileContent)
ctx := context.Background()
parseResult := fileParser.ParseWithResult(ctx, filename, fileContent)
if parseResult.Err != nil {
return nil, formatRequestError("parse local file", parseResult.Err)
}