Our website uses cookies to enhance your browsing experience.
Accept
to the top
>
>
>
Examples of errors detected by the...

Examples of errors detected by the V8010 diagnostic

V8010. Two or more 'case' branches have equivalent expressions.


AdGuardHome

V8010 Two or more case branches have equivalent expressions. migrator.go 95


func validateVersion(current, target uint) (err error) {
  switch {
  case current > target:
    return fmt.Errorf("unknown current schema version %d", current)
  case target > LastSchemaVersion:
    return fmt.Errorf("unknown target schema version %d", target)
  case target < current:
    return fmt.Errorf("target schema version %d lower than current %d",
                       target, current)
  default:
    return nil
  }
}