[bugfix] self-referencing collection pages for status replies (#2364)

This commit is contained in:
kim
2023-11-20 12:22:28 +00:00
committed by GitHub
parent efefdb1323
commit 16275853eb
24 changed files with 611 additions and 427 deletions

View File

@@ -33,3 +33,11 @@ func EqualPtrs[T comparable](t1, t2 *T) bool {
func Ptr[T any](t T) *T {
return &t
}
// PtrValueOr returns either value of ptr, or default.
func PtrValueOr[T any](t *T, _default T) T {
if t != nil {
return *t
}
return _default
}