Add wsl linter and fix

Signed-off-by: Émile Ré <emile@probo.com>
This commit is contained in:
Émile Ré
2026-05-19 14:51:08 +04:00
parent eedfdcecc8
commit 9156d6a16a
882 changed files with 6068 additions and 574 deletions

View File

@@ -87,10 +87,12 @@ func NewCmdAPI(f *cmdutil.Factory) *cobra.Command {
if len(args) == 0 && f.IOStreams.IsStdinTTY() {
return fmt.Errorf("query argument is required when not reading from stdin")
}
data, err := io.ReadAll(f.IOStreams.In)
if err != nil {
return fmt.Errorf("cannot read query from stdin: %w", err)
}
query = string(data)
}
@@ -154,6 +156,7 @@ func parseFields(fields []string) (map[string]any, error) {
if err := json.Unmarshal([]byte(value), &parsed); err != nil {
parsed = value
}
vars[key] = parsed
}