MCPcopy
hub / github.com/grafana/tempo / countOverrides

Function countOverrides

modules/overrides/config_test.go:252–254  ·  view source on GitHub ↗

countOverrides recursively counts the number of non-struct fields in a struct.

(v any)

Source from the content-addressed store, hash-verified

250
251// countOverrides recursively counts the number of non-struct fields in a struct.
252func countOverrides(v any) int {
253 return rvCountFields(reflect.ValueOf(v))
254}
255
256func rvCountFields(rv reflect.Value) int {
257 if rv.Kind() != reflect.Struct {

Callers 1

TestNumberOfOverridesFunction · 0.85

Calls 1

rvCountFieldsFunction · 0.85

Tested by

no test coverage detected