mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-11-05 23:59:31 -06:00
add repeat boost filtering logic, update go-structr, general improvements
This commit is contained in:
parent
cf405352e6
commit
50805fac53
10 changed files with 153 additions and 114 deletions
11
vendor/codeberg.org/gruf/go-structr/runtime.go
generated
vendored
11
vendor/codeberg.org/gruf/go-structr/runtime.go
generated
vendored
|
|
@ -70,7 +70,7 @@ func find_field(t reflect.Type, names []string) (sfield struct_field) {
|
|||
name := names[0]
|
||||
names = names[1:]
|
||||
if !is_exported(name) {
|
||||
panicf("field is not exported: %s", name)
|
||||
panic(fmt.Sprintf("field is not exported: %s", name))
|
||||
}
|
||||
return name
|
||||
}
|
||||
|
|
@ -94,7 +94,7 @@ func find_field(t reflect.Type, names []string) (sfield struct_field) {
|
|||
|
||||
// Check for valid struct type.
|
||||
if t.Kind() != reflect.Struct {
|
||||
panicf("field %s is not struct (or ptr-to): %s", t, name)
|
||||
panic(fmt.Sprintf("field %s is not struct (or ptr-to): %s", t, name))
|
||||
}
|
||||
|
||||
var ok bool
|
||||
|
|
@ -102,7 +102,7 @@ func find_field(t reflect.Type, names []string) (sfield struct_field) {
|
|||
// Look for next field by name.
|
||||
field, ok = t.FieldByName(name)
|
||||
if !ok {
|
||||
panicf("unknown field: %s", name)
|
||||
panic(fmt.Sprintf("unknown field: %s", name))
|
||||
}
|
||||
|
||||
// Set next offset value.
|
||||
|
|
@ -258,11 +258,6 @@ func eface_data(a any) unsafe.Pointer {
|
|||
return (*eface)(unsafe.Pointer(&a)).data
|
||||
}
|
||||
|
||||
// panicf provides a panic with string formatting.
|
||||
func panicf(format string, args ...any) {
|
||||
panic(fmt.Sprintf(format, args...))
|
||||
}
|
||||
|
||||
// assert can be called to indicated a block
|
||||
// of code should not be able to be reached,
|
||||
// it returns a BUG report with callsite.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue