> I'd really love to see local functions, though, not for real scope usage
but for clarity of coding.
You kind-of can: https://play.golang.org/p/8BeeIb_azUM
But if you're not interested in accessing variables in the enclosing scope,
you might as well put them as non-exported functions at the to
Hi Trig,
I'm new to the list and I'm a Go newbie, but
> On 12. Feb, 2021, at 01:09, Trig wrote:
>
> So, in Go... you can either define imports, constants, types, variables one
> at a time... or you can group them using brackets. Why was it decided not to
> be able to do that with functions?
On Thu, Feb 11, 2021 at 4:09 PM Trig wrote:
>
> So, in Go... you can either define imports, constants, types, variables one
> at a time... or you can group them using brackets. Why was it decided not to
> be able to do that with functions? Just curious.
>
> func (
> main() {
> fmt
So, in Go... you can either define imports, constants, types, variables one
at a time... or you can group them using brackets. Why was it decided not
to be able to do that with functions? Just curious.
func (
main() {
fmt.Println(helloWorld())
}
helloWorld() string {