Hugo + Go 1.11 hype thread

So Go 1.11 is near its release. What I’m really expecting:

What about you?


This is great !

Now that we are all used to Scratch for variable manipulation though, I’m wondering if, solely with Go Template (after 1.11) you can just as conviently as with Scratch do the following tasks:

  • Add
  • SetInMap

Scratch will still be very useful (one example is slice appending to create JSON search indexes), but these constructs will be less stupid:

{{ $color := "blue" }}
{{ if .IsHome }}
{{ $color := "orange" }}
{{ end }}

Yes. will wil still need := even to overwrite though?

I have no idea, but it doesn’t really matter for the sake of this discussion.

No, it would be =.


Go 1.11 is released

I know. Can’t wait to get rid of those scratches!

Scratch is so much more than overwriting variables though :slight_smile:

1 Like

I know, I know! But it hurts each time I have to use it to modify a variable… was referring to those scratches :slight_smile:

1 Like