-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
バグ
jpn law search "民法" -o csv
→ JSON形式で出力される(CSVではない)
原因
cmd/law.go 等で FormatTable 以外の時に table をnilで output.Print() に渡している。formatter.go の FormatCSV はtable==nilの時JSONにfallbackする仕様。
修正方針
テーブル構築をformat判定の外に出す:
// Before
if format == output.FormatTable {
table := &output.Table{...}
return output.Print(format, resp, table)
}
return output.Print(format, resp, nil)
// After
table := &output.Table{...}
return output.Print(format, resp, table)law, subsidy, corp, invoice, edinet, gbiz, realestate, patent の全searchコマンドに適用が必要。
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels