mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-10-29 02:12:25 -05:00
[bugfix] self-referencing collection pages for status replies (#2364)
This commit is contained in:
parent
efefdb1323
commit
16275853eb
24 changed files with 611 additions and 427 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue