2 Matching Annotations
- Sep 2022
-
metalblueberry.github.io metalblueberry.github.io
-
your cognitive load increases with the level of indentation. 1 2 3 4 5 6 7 8 9 10 if r.Method == "GET" { if r.Header.Get("X-API-KEY") == key { // ok return nil }else{ return errors.New("Key is not valid") } } else { return errors.New("Invalid Method") }
-
Avoid indentation levels, If you find yourself with more than 3, you should create a function.
-