浏览代码

1) Update readme file credits and go report badge added; 2) Remove use less function; 3) Update test file.

Ri Xu 9 年之前
父节点
当前提交
0e61ae7eda
共有 8 个文件被更改,包括 41 次插入10 次删除
  1. 27 0
      LICENSE.md
  2. 5 0
      README.md
  3. 1 0
      excelize_test.go
  4. 0 10
      lib.go
  5. 2 0
      xmlContentTypes.go
  6. 2 0
      xmlSharedStrings.go
  7. 2 0
      xmlWorkbook.go
  8. 2 0
      xmlWorksheet.go

+ 27 - 0
LICENSE.md

@@ -0,0 +1,27 @@
+Copyright (c) 2016, Ri Xu
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+* Redistributions of source code must retain the above copyright notice, this
+  list of conditions and the following disclaimer.
+
+* Redistributions in binary form must reproduce the above copyright notice,
+  this list of conditions and the following disclaimer in the documentation
+  and/or other materials provided with the distribution.
+
+* Neither the name of [project] nor the names of its
+  contributors may be used to endorse or promote products derived from
+  this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

+ 5 - 0
README.md

@@ -4,6 +4,7 @@
 
 [![Build Status](https://travis-ci.org/Luxurioust/excelize.svg?branch=master)](https://travis-ci.org/Luxurioust/excelize)
 [![Code Coverage](https://codecov.io/gh/Luxurioust/excelize/branch/master/graph/badge.svg)](https://codecov.io/gh/Luxurioust/excelize)
+[![Go Report Card](https://goreportcard.com/badge/github.com/Luxurioust/excelize)](https://goreportcard.com/report/github.com/Luxurioust/excelize)
 [![GoDoc](https://godoc.org/github.com/Luxurioust/excelize?status.svg)](https://godoc.org/github.com/Luxurioust/excelize)
 [![Licenses](https://img.shields.io/badge/license-bsd-orange.svg)](https://opensource.org/licenses/BSD-3-Clause)
 [![Join the chat at https://gitter.im/xuri-excelize/Lobby](https://img.shields.io/badge/GITTER-join%20chat-green.svg)](https://gitter.im/xuri-excelize/Lobby)
@@ -79,6 +80,10 @@ func main() {
 
 Contributions are welcome! Open a pull request to fix a bug, or open an issue to discuss a new feature or change.
 
+### Credits
+
+Some struct of XML originally by [tealeg/xlsx](https://github.com/tealeg/xlsx).
+
 ## Licenses
 
 This program is under the terms of the BSD 3-Clause License. See [https://opensource.org/licenses/BSD-3-Clause](https://opensource.org/licenses/BSD-3-Clause).

+ 1 - 0
excelize_test.go

@@ -41,6 +41,7 @@ func TestExcelize(t *testing.T) {
 	if err != nil {
 		t.Error(err)
 	}
+	GetCellValue(file, "Sheet2", "a-1")
 	GetCellValue(file, "Sheet2", "a5")
 	GetCellValue(file, "Sheet2", "D11")
 	GetCellValue(file, "Sheet2", "D12")

+ 0 - 10
lib.go

@@ -6,7 +6,6 @@ import (
 	"io"
 	"log"
 	"math"
-	"os"
 	"regexp"
 	"strconv"
 	"strings"
@@ -100,15 +99,6 @@ func titleToNumber(s string) int {
 	return sum - 1
 }
 
-// Check the file exists
-func pathExist(_path string) bool {
-	_, err := os.Stat(_path)
-	if err != nil && os.IsNotExist(err) {
-		return false
-	}
-	return true
-}
-
 // Split Excel sheet column title to string and integer, return XAxis
 func getColIndex(axis string) string {
 	r, err := regexp.Compile(`[^\D]`)

+ 2 - 0
xmlContentTypes.go

@@ -1,3 +1,5 @@
+// Some code of this file reference tealeg/xlsx
+
 package excelize
 
 import (

+ 2 - 0
xmlSharedStrings.go

@@ -1,3 +1,5 @@
+// Some code of this file reference tealeg/xlsx
+
 package excelize
 
 import (

+ 2 - 0
xmlWorkbook.go

@@ -1,3 +1,5 @@
+// Some code of this file reference tealeg/xlsx
+
 package excelize
 
 import (

+ 2 - 0
xmlWorksheet.go

@@ -1,3 +1,5 @@
+// Some code of this file reference tealeg/xlsx
+
 package excelize
 
 import (