title: Return from nested blocks, scope issue
body: <h1>Basic concept</h1>
  
  <p>I'm learning Go and I can't understand how to return data from an inner block of a function.</p>
  
  <pre><code>package main
  
  import (
      "fmt"
  )
  
  func main() {
      fmt.Println("Hello, playground")
      if isTrue("asasa") {
          fmt.Println("isTrue is true")
      }
  }
  
  func isTrue(s string) bool {
      if s == "asasa" {
          fmt.Println("it matches")
          return true
      }
  }
  </code></pre>
  
  <p><a href="https://play.golang.org/p/x6l29CNdg-o" rel="nofollow noreferrer">https://play.golang.org/p/x6l29CNdg-o</a></p>
  
  <p>How should I return a condition met inside a nested (<strong>even multiple time nested</strong>) block?</p>
  
  <h1>Real case scenario</h1>
  
  <pre><code>func isUnique(h, c, L float64) bool {
  
      for i, color := range usuedColors {
          if color[0] == h &amp;&amp; color[1] == c &amp;&amp; color[2] == L {
              fmt.Println("This color already exist!")
              return false
          } else {
              return true
          }
      }
  }
  </code></pre>
  
  <p>I receive a triple of values <code>h, c, L</code> and I want to check if it is unique against a 2D slice where I've previously stored other triples.
  I cycle through all the triple and if a match exist I want <code>isUnique</code> to return as false, else true. </p>