Просмотр исходного кода

SetCellValue: use fmt.Sprint(v) instead of fmt.Sprintf("%v", v)

Because that does the same thing, but without having to parse a format
string.

Signed-off-by: Olivier Mengué <dolmen@cpan.org>
Olivier Mengué 6 лет назад
Родитель
Сommit
ac395a60ed
1 измененных файлов с 1 добавлено и 1 удалено
  1. 1 1
      cell.go

+ 1 - 1
cell.go

@@ -94,7 +94,7 @@ func (f *File) SetCellValue(sheet, axis string, value interface{}) error {
 	case nil:
 	case nil:
 		err = f.SetCellStr(sheet, axis, "")
 		err = f.SetCellStr(sheet, axis, "")
 	default:
 	default:
-		err = f.SetCellStr(sheet, axis, fmt.Sprintf("%v", value))
+		err = f.SetCellStr(sheet, axis, fmt.Sprint(value))
 	}
 	}
 	return err
 	return err
 }
 }