prysmaticlabs / prysm

Function with cyclomatic complexity higher than threshold GO-R1005
Anti-pattern
Minor
2 occurrences in this check
func RealPosition has a cyclomatic complexity of 30 with "very-high" risk
 97
 98// RealPosition denotes the position of the field in the beacon state.
 99// The value might differ for different state versions.
100func (f FieldIndex) RealPosition() int {101	switch f {
102	case GenesisTime:
103		return 0
func String has a cyclomatic complexity of 33 with "very-high" risk
 26type FieldIndex int
 27
 28// String returns the name of the field index.
 29func (f FieldIndex) String() string { 30	switch f {
 31	case GenesisTime:
 32		return "genesisTime"