From 61d5335b566064d1a461fac49f526befef4f6df3 Mon Sep 17 00:00:00 2001 From: sergeilem Date: Tue, 5 Mar 2019 22:31:15 +0300 Subject: [PATCH] Cleaned some comments --- README.md | 15 +++------------ col.go | 8 +++----- 2 files changed, 6 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index 099dbbb..69a26b1 100644 --- a/README.md +++ b/README.md @@ -2,17 +2,9 @@ [![GoDoc](https://godoc.org/github.com/extrame/xls?status.svg)](https://godoc.org/github.com/extrame/xls) -Pure Golang xls library writen by [Rongshu Tech(chinese)](http://www.rongshu.tech). +Pure Golang xls library writen by [Rongshu Tech (chinese)](http://www.rongshu.tech), based on libxls. -Thanks for contributions from Tamás Gulácsi, sergeilem. - -**English User please mailto** [Liu Ming](mailto:liuming@rongshu.tech) - -This is a xls library writen in pure Golang. Almostly it is translated from the libxls library in c. - -The master brunch has just the reading function without the format. - -***new_formater** branch is for better format for date and number ,but just under test, you can try it in development environment. If you have some problem about the output format, tell me the problem, I will try to fix it.* +Thanks for contributions from Tamás Gulácsi. # Basic Usage @@ -20,5 +12,4 @@ The master brunch has just the reading function without the format. * Use **OpenWithCloser** function for open file and use the return value closer for close file * Use **OpenReader** function for open xls from a reader, you should close related file in your own code -* Follow the example in GODOC - +* Follow the example in GoDoc \ No newline at end of file diff --git a/col.go b/col.go index 6856fcc..13d5ad7 100644 --- a/col.go +++ b/col.go @@ -54,10 +54,10 @@ func (xf *XfRk) String(wb *WorkBook) string { fNo := wb.Xfs[idx].formatNo() if fNo >= 164 { // user defined format if formatter := wb.Formats[fNo]; formatter != nil { - if (strings.Contains(formatter.str, "#") || strings.Contains(formatter.str, ".00")){ + if strings.Contains(formatter.str, "#") || strings.Contains(formatter.str, ".00") { //If format contains # or .00 then this is a number - return xf.Rk.String() - }else{ + return xf.Rk.String() + } else { i, f, isFloat := xf.Rk.number() if !isFloat { f = float64(i) @@ -94,13 +94,11 @@ func (rk RK) number() (intNum int64, floatNum float64, isFloat bool) { } return } - //+++ add lines from here if multiplied != 0 { isFloat = true floatNum = float64(val) / 100 return } - //+++end return int64(val), 0, false }