Skip to content

Commit

Permalink
fix: error when running format-as is empty` (#219)
Browse files Browse the repository at this point in the history
* feat: implement word wrapping for formatted output

* fix: fix error when trying to use nil as a map key

---------

Co-authored-by: Guzmán Monné <guzmonne@hotmail.com>
  • Loading branch information
cloudbridgeuy and guzmonne committed Feb 21, 2024
1 parent 17f3007 commit e466173
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ func initFlags() {
})
}

if config.Format && config.FormatText[config.FormatAs] == "" {
if config.Format && config.FormatAs != "" && config.FormatText[config.FormatAs] == "" {
config.FormatText[config.FormatAs] = defaultConfig().FormatText[config.FormatAs]
}

Expand Down

0 comments on commit e466173

Please sign in to comment.