mirror of
https://github.com/larksuite/cli.git
synced 2026-07-13 13:14:30 +08:00
chore(sheets): suppress forbidigo on csv-put stdin pipe detection
os.Stdin.Stat is intentional here - pipe detection needs the real process fd; IOStreams.In is a plain io.Reader without Stat. Clears the lint failure left by the stdin-fallback commit.
This commit is contained in:
@@ -210,7 +210,7 @@ func cellsSetStyleInput(runtime flagView, token, sheetID, sheetName string) (map
|
||||
// tests. A char device is a terminal; anything else (pipe, redirect, /dev/null)
|
||||
// counts as piped input.
|
||||
var csvPutStdinIsPipe = func() bool {
|
||||
fi, err := os.Stdin.Stat()
|
||||
fi, err := os.Stdin.Stat() //nolint:forbidigo // pipe detection needs the real process fd; IOStreams.In is a plain io.Reader without Stat
|
||||
if err != nil {
|
||||
return false
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user