summaryrefslogtreecommitdiff
path: root/lib.go
diff options
context:
space:
mode:
Diffstat (limited to 'lib.go')
-rw-r--r--lib.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib.go b/lib.go
index edac98a..86f8d16 100644
--- a/lib.go
+++ b/lib.go
@@ -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 {