[MM-57963] Log Name and DisplayName of groups (#26836)
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
3513d310af
Коммит
0e6bfbdd26
@@ -7,3 +7,13 @@ func NewBool(b bool) *bool { return &b }
|
||||
func NewInt(n int) *int { return &n }
|
||||
func NewInt64(n int64) *int64 { return &n }
|
||||
func NewString(s string) *string { return &s }
|
||||
|
||||
// SafeDereference returns the zero value of T if t is nil.
|
||||
// Otherwise it return the derference of t.
|
||||
func SafeDereference[T any](t *T) T {
|
||||
if t == nil {
|
||||
var t T
|
||||
return t
|
||||
}
|
||||
return *t
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user