MCPcopy Create free account
hub / github.com/buke/quickjs-go / shouldSkipMethod

Function shouldSkipMethod

class_reflect.go:315–328  ·  view source on GitHub ↗

shouldSkipMethod determines if a method should be skipped during binding

(method reflect.Method, opts *ReflectOptions)

Source from the content-addressed store, hash-verified

313
314// shouldSkipMethod determines if a method should be skipped during binding
315func shouldSkipMethod(method reflect.Method, opts *ReflectOptions) bool {
316 // Check prefix filter
317 if opts.MethodPrefix != "" && !strings.HasPrefix(method.Name, opts.MethodPrefix) {
318 return true
319 }
320
321 // Check ignored list
322 if slices.Contains(opts.IgnoredMethods, method.Name) {
323 return true
324 }
325
326 // Check special methods
327 return isSpecialMethod(method.Name)
328}
329
330// shouldSkipField determines if a field should be skipped during binding
331func shouldSkipField(field reflect.StructField, opts *ReflectOptions) bool {

Callers 1

addReflectionMethodsFunction · 0.85

Calls 1

isSpecialMethodFunction · 0.85

Tested by

no test coverage detected