summaryrefslogtreecommitdiff
path: root/lib.go
diff options
context:
space:
mode:
authorRi Xu <xuri.me@gmail.com>2017-01-18 16:05:01 +0800
committerRi Xu <xuri.me@gmail.com>2017-01-18 16:05:01 +0800
commit52796f6e58e95145e2964d0d313a2f721dcc040e (patch)
tree721e818837035953828c75e102aa7dede7f91492 /lib.go
parentf05df2a0182ee5761f5fbe7e56020313a0ab0b61 (diff)
Format commants, break comments after 80 characters.
Diffstat (limited to 'lib.go')
-rw-r--r--lib.go18
1 files changed, 9 insertions, 9 deletions
diff --git a/lib.go b/lib.go
index dfd1bdc..7b9174e 100644
--- a/lib.go
+++ b/lib.go
@@ -9,16 +9,16 @@ import (
"math"
)
-// ReadZip takes a pointer to a zip.ReadCloser and returns a
-// xlsx.File struct populated with its contents. In most cases
-// ReadZip is not used directly, but is called internally by OpenFile.
+// ReadZip takes a pointer to a zip.ReadCloser and returns a xlsx.File struct
+// populated with its contents. In most cases ReadZip is not used directly, but
+// is called internally by OpenFile.
func ReadZip(f *zip.ReadCloser) (map[string]string, int, error) {
defer f.Close()
return ReadZipReader(&f.Reader)
}
-// ReadZipReader can be used to read an XLSX in memory without
-// touching the filesystem.
+// ReadZipReader can be used to read an XLSX in memory without touching the
+// filesystem.
func ReadZipReader(r *zip.Reader) (map[string]string, int, error) {
fileList := make(map[string]string)
worksheets := 0
@@ -88,8 +88,8 @@ func titleToNumber(s string) int {
return sum - 1
}
-// letterOnlyMapF is used in conjunction with strings.Map to return
-// only the characters A-Z and a-z in a string.
+// letterOnlyMapF is used in conjunction with strings.Map to return only the
+// characters A-Z and a-z in a string.
func letterOnlyMapF(rune rune) rune {
switch {
case 'A' <= rune && rune <= 'Z':
@@ -100,8 +100,8 @@ func letterOnlyMapF(rune rune) rune {
return -1
}
-// intOnlyMapF is used in conjunction with strings.Map to return only
-// the numeric portions of a string.
+// intOnlyMapF is used in conjunction with strings.Map to return only the
+// numeric portions of a string.
func intOnlyMapF(rune rune) rune {
if rune >= 48 && rune < 58 {
return rune