title: Join range block in go template
body: <p>I have a go template like this:</p>
  
  <pre><code> "environment": [
     {{- range $k,$v := .env }}
       {
         "name": "{{ $k }}",
         "value": "{{ $v }}"
       },
     {{- end }}
     ]
  </code></pre>
  
  <p>and i am getting the output below:</p>
  
  <pre><code>     "environment": [
      {
        "name": "name",
        "value": "test"
      },
      {
        "name": "region",
        "value": "us-east-1"
      },
    ]
  </code></pre>
  
  <p>and i want to render it like below:</p>
  
  <pre><code>    "environment": [
      {
        "name": "name",
        "value": "bxbd"
      },
      {
        "name": "region",
        "value": "us-east-1"
      }
    ]
  </code></pre>
  
  <p>I am not able to get rid of the last comma to make valid json.
  Or is it possible to somehow send the complete range block to some custom  join function?</p>