mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-10-29 02:22:26 -05:00
[feature] add support for polls + receiving federated status edits (#2330)
This commit is contained in:
parent
7204ccedc3
commit
e9e5dc5a40
84 changed files with 3992 additions and 570 deletions
|
|
@ -17,6 +17,18 @@
|
|||
|
||||
package util
|
||||
|
||||
// EqualPtrs returns whether the values contained within two comparable ptr types are equal.
|
||||
func EqualPtrs[T comparable](t1, t2 *T) bool {
|
||||
switch {
|
||||
case t1 == nil:
|
||||
return (t2 == nil)
|
||||
case t2 == nil:
|
||||
return false
|
||||
default:
|
||||
return (*t1 == *t2)
|
||||
}
|
||||
}
|
||||
|
||||
// Ptr returns a pointer to the passed in type
|
||||
func Ptr[T any](t T) *T {
|
||||
return &t
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue