01

command
v0.0.0-...-6ea799e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 26, 2022 License: MIT Imports: 3 Imported by: 0

README

Passing Data To Templates

You get to pass in one value - that's it!

Fortunately, we have many different types which that value can be including composite types which compose together values. (These are also known as aggregate data types - they aggregate together many different values).

Slice

Use this for passing in a bunch of values of the same type. We could have a []int or a []string or a slice of any type.

Map

Use this for passing in key-value data.

Struct

This is probably the most commonly used data type when passing data to templates. A struct allows you to compose together values of different types.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL