summaryrefslogtreecommitdiff
path: root/lib.go
diff options
context:
space:
mode:
authorxuri <xuri.me@gmail.com>2017-11-17 09:33:50 +0800
committerGitHub <noreply@github.com>2017-11-17 09:33:50 +0800
commit90998bfb4daac6e38346c03f41cb3c4e78b1ef7a (patch)
treed8ce92311d0a52772e1cfba5c869775e8857c6bf /lib.go
parenteb54510cadaa66649ddf6caf22d1b723c5a4b17a (diff)
parent88e48e079a91191e05f32a232f8dec4454b25238 (diff)
Merge pull request #149 from dolmen-go/feature/SheetView-options
Add SetSheetViewOptions()
Diffstat (limited to 'lib.go')
-rw-r--r--lib.go11
1 files changed, 11 insertions, 0 deletions
diff --git a/lib.go b/lib.go
index b28b50f..2f3df35 100644
--- a/lib.go
+++ b/lib.go
@@ -121,3 +121,14 @@ func deepCopy(dst, src interface{}) error {
}
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 }
+
+// defaultTrue returns true if b is nil, or the pointed value.
+func defaultTrue(b *bool) bool {
+ if b == nil {
+ return true
+ }
+ return *b
+}