mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-11-10 12:27:30 -06:00
[feature] Add domain permission drafts and excludes (#3547)
* [feature] Add domain permission drafts and excludes * fix typescript complaining * lint * make filenames more consistent * test own domain excluded
This commit is contained in:
parent
c2029df9bc
commit
301543616b
69 changed files with 5664 additions and 264 deletions
|
|
@ -17,6 +17,8 @@
|
|||
|
||||
package util
|
||||
|
||||
import "unsafe"
|
||||
|
||||
// EqualPtrs returns whether the values contained within two comparable ptr types are equal.
|
||||
func EqualPtrs[T comparable](t1, t2 *T) bool {
|
||||
switch {
|
||||
|
|
@ -59,3 +61,8 @@ func PtrOrValue[T any](t *T, value T) T {
|
|||
}
|
||||
return value
|
||||
}
|
||||
|
||||
func IsNil(i interface{}) bool {
|
||||
type eface struct{ _, data unsafe.Pointer }
|
||||
return (*eface)(unsafe.Pointer(&i)).data == nil
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue