[39] Results

Golang : Populate dropdown with html/template example

golang html dropdown for-loop-range-in-html-template

Creating a clickable dropdown button or HTML select tag is a common task for populating a form. Here is a….... read more

Golang : Executing and evaluating nested loop in html template

golang html-template nested-loops range cant-evaluate-field

Alright, just a minor problem and putting the solution here on how to fix this problem for future reference. Basically,….... read more

Golang : Print instead of building pyramids

golang pyramids for-loop

Building a pyramid using ancient Egyptians way can be too difficult for more software developers. Just for fun, let's print….... read more

Golang : Read until certain character to break for loop

golang break-for-loop

Encounter a situation where I need to tell the editor that is time to save the input and exit while….... read more

Golang : How to pass map to html template and access the map's elements

golang index panic-assignment-to-entry-in-nil-map html-text-template slice-array

For this tutorial, we will learn how to pass a map to text or html template and learn how to….... read more

Golang : For loop continue,break and range

golang for continue break range

Feeling like writing about FOR loop today so....this tutorial will explore how Golang's FOR loop works.

For loop is….... read more

Golang : How to fix html/template : "somefile" is undefined error?

golang html-template undefined-error parse-html

One of the most common mistakes when using html/template package ExecuteTemplate() function is forgetting to parse the HTML file first.... read more

Golang : How to iterate a slice without using for loop?

golang for-loop recursive iterate

A very simple example on how to iterate a slice of integers without using a for loop and use recursive….... read more