tree

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Apr 20, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Copyright © 2022 Roberto Hidalgo <chinampa@un.rob.mx> SPDX-License-Identifier: Apache-2.0

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Build

func Build(cc *cobra.Command, depth int)

func ChildrenNames

func ChildrenNames() []string

func CommandList

func CommandList() []*command.Command

func Serialize

func Serialize(serializationFn func(any) ([]byte, error)) (string, error)

Types

type CommandTree

type CommandTree struct {
	Command  *command.Command `json:"command"`
	Children []*CommandTree   `json:"children"`
}

func (*CommandTree) Traverse

func (t *CommandTree) Traverse(fn func(cmd *command.Command) error) error

Jump to

Keyboard shortcuts

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