#Data
4 articles
10 How to Understanding HTML Template Data in Golang
Introduction to Data Templates
If you have studied HTML Templates in the previous article, then we will continue with data templates where we can display this data dynamically by using struct or map data. However, we need to know the changes in the template text. We need to know the name of the field or key that we will use to fill in the dynamic data in the template. We can mention the name of the field
or key
, for example {{.FieldName}}
.
Getting to Know Pointers in Golang
We know that sending a variable to a function can be a parameter or a pointer. This pointer is usually a data allocation with a certain address. An example can be seen in the program below.
Getting to know Data Types in Golang
##Numbers
Integers
There are integer types that we can use, including uint8
, uint16
, uint32
, uint64
, int8
, int16
, int32
and int64
. The following is an example of using integer type variables in the go program:
How to Install Golang on Windows, Macbook and Linux Computers
First download the Golang library on the [Golang] website (https://golang.org/doc/install).