Hacker News new | ask | show | jobs
by jaggederest 1593 days ago
Is there no equivalent to a lexical scope let definition?

let {

  var err := error
  
  scoped code

}
2 comments

Of course there is:

    {
        var err error
        scoped code
    }
yes, you can wrap code in {} to scope it.