diff options
author | xuri <xuri.me@gmail.com> | 2019-12-23 00:07:40 +0800 |
---|---|---|
committer | xuri <xuri.me@gmail.com> | 2019-12-23 00:07:40 +0800 |
commit | 4e4a5b9b3e052d1694442515492792fb1aa74c5a (patch) | |
tree | ebb0746cc3a26e50ed921f6f25cb295be6c3c417 /lib.go | |
parent | ae2865d9237cfd27d7bc4fbef3870b3361597be8 (diff) |
Improve compatibility, fix workbook's rels ID calc error
Diffstat (limited to 'lib.go')
-rw-r--r-- | lib.go | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -198,6 +198,15 @@ func CoordinatesToCellName(col, row int) (string, error) { // boolPtr returns a pointer to a bool with the given value. func boolPtr(b bool) *bool { return &b } +// intPtr returns a pointer to a int with the given value. +func intPtr(i int) *int { return &i } + +// float64Ptr returns a pofloat64er to a float64 with the given value. +func float64Ptr(f float64) *float64 { return &f } + +// stringPtr returns a pointer to a string with the given value. +func stringPtr(s string) *string { return &s } + // defaultTrue returns true if b is nil, or the pointed value. func defaultTrue(b *bool) bool { if b == nil { |