• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

ory / x / 13912274386

18 Mar 2025 12:01AM UTC coverage: 61.082% (-1.2%) from 62.237%
13912274386

push

github

web-flow
chore: bump and reduce dependencies (#845)

- bump a bunch of dependencies
- move dev dependencies to `go tools`
- add go.mod for non-consumable module

35 of 42 new or added lines in 6 files covered. (83.33%)

179 existing lines in 21 files now uncovered.

7088 of 11604 relevant lines covered (61.08%)

0.69 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/pointerx/pointerx.go
1
// Copyright © 2023 Ory Corp
2
// SPDX-License-Identifier: Apache-2.0
3

4
package pointerx
5

6
// Ptr returns the input value's pointer.
UNCOV
7
func Ptr[T any](v T) *T {
×
UNCOV
8
        return &v
×
UNCOV
9
}
×
10

11
// Deref returns the input values de-referenced value, or zero value if nil.
12
func Deref[T any](p *T) T {
×
13
        if p == nil {
×
14
                var zero T
×
15
                return zero
×
16
        }
×
17
        return *p
×
18
}
19

20
// String returns the input value's pointer.
21
// Deprecated: use Ptr instead.
22
func String(s string) *string {
×
23
        return &s
×
24
}
×
25

26
// StringR is the reverse to String.
27
// Deprecated: use Deref instead.
28
func StringR(s *string) string {
×
29
        if s == nil {
×
30
                return ""
×
31
        }
×
32
        return *s
×
33
}
34

35
// Int returns the input value's pointer.
36
// Deprecated: use Ptr instead.
37
func Int(s int) *int {
×
38
        return &s
×
39
}
×
40

41
// IntR is the reverse to Int.
42
// Deprecated: use Deref instead.
43
func IntR(s *int) int {
×
44
        if s == nil {
×
45
                return int(0)
×
46
        }
×
47
        return *s
×
48
}
49

50
// Int32 returns the input value's pointer.
51
// Deprecated: use Ptr instead.
52
func Int32(s int32) *int32 {
×
53
        return &s
×
54
}
×
55

56
// Int32R is the reverse to Int32.
57
// Deprecated: use Deref instead.
58
func Int32R(s *int32) int32 {
×
59
        if s == nil {
×
60
                return int32(0)
×
61
        }
×
62
        return *s
×
63
}
64

65
// Int64 returns the input value's pointer.
66
// Deprecated: use Ptr instead.
67
func Int64(s int64) *int64 {
×
68
        return &s
×
69
}
×
70

71
// Int64R is the reverse to Int64.
72
// Deprecated: use Deref instead.
73
func Int64R(s *int64) int64 {
×
74
        if s == nil {
×
75
                return int64(0)
×
76
        }
×
77
        return *s
×
78
}
79

80
// Float32 returns the input value's pointer.
81
// Deprecated: use Ptr instead.
82
func Float32(s float32) *float32 {
×
83
        return &s
×
84
}
×
85

86
// Float32R is the reverse to Float32.
87
// Deprecated: use Deref instead.
88
func Float32R(s *float32) float32 {
×
89
        if s == nil {
×
90
                return float32(0)
×
91
        }
×
92
        return *s
×
93
}
94

95
// Float64 returns the input value's pointer.
96
// Deprecated: use Ptr instead.
97
func Float64(s float64) *float64 {
×
98
        return &s
×
99
}
×
100

101
// Float64R is the reverse to Float64.
102
// Deprecated: use Deref instead.
103
func Float64R(s *float64) float64 {
×
104
        if s == nil {
×
105
                return float64(0)
×
106
        }
×
107
        return *s
×
108
}
109

110
// Bool returns the input value's pointer.
111
// Deprecated: use Ptr instead.
112
func Bool(s bool) *bool {
×
113
        return &s
×
114
}
×
115

116
// BoolR is the reverse to Bool.
117
// Deprecated: use Deref instead.
118
func BoolR(s *bool) bool {
×
119
        if s == nil {
×
120
                return false
×
121
        }
×
122
        return *s
×
123
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc