Update layout.go

34a348528b
master
Brandon Lee Camilleri 5 years ago committed by GitHub
parent a4b86c4d15
commit 8d424b748f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      layout.go

@ -274,7 +274,7 @@ func last(str string) string {
//-----------------------------------------------------------------------------
func currency(str string) string {
if str == `N/A` {
if str == `N/A` || len(str) == 0 {
return `-`
}
if sign := str[0:1]; sign == `+` || sign == `-` {
@ -287,7 +287,7 @@ func currency(str string) string {
// Returns percent value truncated at 2 decimal points.
//-----------------------------------------------------------------------------
func percent(str string) string {
if str == `N/A` {
if str == `N/A` || len(str) == 0 {
return `-`
}

Loading…
Cancel
Save