[28] Results

Golang : How to call function inside template with template.FuncMap

golang html-template funcmap call-function wordwrap text-template

Alright, just a simple tutorial on how to call your own function inside HTML template. For this example, we will….... read more

Golang : How to use if, eq and print properly in html template

golang if eq print html-template text-template...

Alright, just a simple problem that took me a while to get it right. Putting the solution down here for….... 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 : 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 : Interpolating or substituting variables in string examples

golang interpolate substitute text-template variables string

For this quick tutorial, we will explore how to interpolate(substitute) actual data into variables inside a string. Will keep these….... read more

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 : Pagination with go-paginator configuration example

golang eq ge html-template li-active pagination

Here is an example that you can use as reference on how to configure go-paginator properly. The snippets below….... 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