summaryrefslogtreecommitdiff
path: root/lib.go
diff options
context:
space:
mode:
authorxuri <xuri.me@gmail.com>2018-06-17 21:38:14 +0800
committerGitHub <noreply@github.com>2018-06-17 21:38:14 +0800
commit5db716d849d51b630822571c8a0aa4edd7cc8365 (patch)
treebfb04fe1249c52198d19b4c8f5ca6788730326eb /lib.go
parent9e463b4614348b3ddc04b1fedd5d662845ce0fb9 (diff)
parent4a1b4064568189d6f819f5fe19ff9bf6d6e8de95 (diff)
Merge pull request #155 from dolmen-go/deepcopy-with-reflect
CopySheet() using reflect instead of encoding/gob
Diffstat (limited to 'lib.go')
-rw-r--r--lib.go12
1 files changed, 0 insertions, 12 deletions
diff --git a/lib.go b/lib.go
index fc95b23..4379be4 100644
--- a/lib.go
+++ b/lib.go
@@ -3,7 +3,6 @@ package excelize
import (
"archive/zip"
"bytes"
- "encoding/gob"
"io"
"log"
"math"
@@ -115,17 +114,6 @@ func intOnlyMapF(rune rune) rune {
return -1
}
-// deepCopy provides method to creates a deep copy of whatever is passed to it
-// and returns the copy in an interface. The returned value will need to be
-// asserted to the correct type.
-func deepCopy(dst, src interface{}) error {
- var buf bytes.Buffer
- if err := gob.NewEncoder(&buf).Encode(src); err != nil {
- return err
- }
- return gob.NewDecoder(bytes.NewBuffer(buf.Bytes())).Decode(dst)
-}
-
// boolPtr returns a pointer to a bool with the given value.
func boolPtr(b bool) *bool { return &b }