Skip to content

Commit

Permalink
Don't panic if -f doesn't contain any formatting characters
Browse files Browse the repository at this point in the history
  • Loading branch information
arp242 committed Apr 8, 2021
1 parent d476098 commit d1b7804
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions format.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,10 @@ func (f *Format) Sort(col string) {
}

func (f *Format) SortNum(col string) {
if len(f.cols) == 0 {
return
}

coli := 0
for i, c := range f.cols {
if c.name == col {
Expand Down

0 comments on commit d1b7804

Please sign in to comment.