data

package
v2.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2026 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const CAT = "CAT"
View Source
const DOG = "DOG"

Variables

View Source
var PeopleWithPets = []Person{
	{Name: "Carl", Age: 34, Pets: []Pet{}},
	{Name: "John", Age: 20, Pets: []Pet{{Name: "Bobby", Type: DOG, Age: 2}, {Name: "Mike", Type: DOG, Age: 12}}},
	{Name: "Grace", Age: 40, Pets: []Pet{{Name: "Pepe", Type: DOG, Age: 4}, {Name: "Snowball", Type: CAT, Age: 8}}},
	{Name: "Robert", Age: 40, Pets: []Pet{{Name: "Ronny", Type: CAT, Age: 3}}},
}

Functions

This section is empty.

Types

type Person

type Person struct {
	Name string
	Age  int
	Pets []Pet
}

type Pet

type Pet struct {
	Name string
	Type string
	Age  int
}

Jump to

Keyboard shortcuts

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