menu

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2023 License: BSD-1-Clause Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Item

type Item struct {
	// The name of the menu item
	Name string
	// The URL of the menu item
	URL *MenuURL
	// Custom data for the menu item
	Data any

	// The weight of the menu item
	Weight int
	// contains filtered or unexported fields
}

func NewItem

func NewItem(name, wholeURL, urlPart string, weight int, data ...any) *Item

func (*Item) Children

func (m *Item) Children(add ...*Item) Items

func (*Item) ForEach

func (m *Item) ForEach(f func(*Item))

type Items

type Items []*Item
type MenuURL struct {
	WholeURL string
	URLPart  string
}

Jump to

Keyboard shortcuts

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