Fix #1: errcheckの警告が出ないように対応
Errorを返却している箇所でエラーチェックを行わない場合に出る警告に対応。 ハンドリング不要のため、明示的に`_`に代入するように修正。
This commit was merged in pull request #2.
This commit is contained in:
@@ -52,7 +52,7 @@ func run(args []string, stdin io.Reader, stdout, stderr io.Writer) error {
|
|||||||
fs.StringVar(&opt.sheet, "sheet", "Sheet1", "worksheet name for xlsx input/output")
|
fs.StringVar(&opt.sheet, "sheet", "Sheet1", "worksheet name for xlsx input/output")
|
||||||
fs.BoolVar(&opt.pretty, "pretty", true, "pretty-print structured output")
|
fs.BoolVar(&opt.pretty, "pretty", true, "pretty-print structured output")
|
||||||
fs.Usage = func() {
|
fs.Usage = func() {
|
||||||
fmt.Fprintln(stderr, `Usage:
|
_, _ = fmt.Fprintln(stderr, `Usage:
|
||||||
dataxl -from yaml -to tsv -i input.yaml -o output.tsv
|
dataxl -from yaml -to tsv -i input.yaml -o output.tsv
|
||||||
dataxl -from tsv -to json < paste-from-excel.tsv
|
dataxl -from tsv -to json < paste-from-excel.tsv
|
||||||
dataxl -from json -to xlsx -i data.json -o data.xlsx
|
dataxl -from json -to xlsx -i data.json -o data.xlsx
|
||||||
@@ -150,7 +150,7 @@ func writeOutput(path string, stdout io.Writer, data []byte) error {
|
|||||||
_, err := stdout.Write(data)
|
_, err := stdout.Write(data)
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
return os.WriteFile(path, data, 0644)
|
return os.WriteFile(path, data, 0o644)
|
||||||
}
|
}
|
||||||
|
|
||||||
func normalizeFormat(format string) string {
|
func normalizeFormat(format string) string {
|
||||||
|
|||||||
Reference in New Issue
Block a user