{"modulePath":"github.com/kptdev/kpt/cli","version":"v1.0.2-pre.4","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package cmdtree\n\n## Constants\n\n```go\nconst (\n\t// TreeStructurePackage configures TreeWriter to generate the tree structure off of the\n\t// Resources packages.\n\tTreeStructurePackage TreeStructure = \"directory\"\n\t// %q holds the package name\n\tPkgNameFormat = \"Package %q\"\n\t// PkgNameWithDepFormat formats a package name with its dependency type,\n\tPkgNameWithDepFormat = PkgNameFormat + \" (%s)\"\n\n\t// PkgTypeIndependent indicates a package with its own upstream source.\n\tPkgTypeIndependent = \"independent\"\n\t// PkgTypeDependent indicates a package without upstream (inherits from parent).\n\tPkgTypeDependent = \"dependent\"\n)\n```\n\n## Variables\n\n```go\nvar GraphStructures = []string{string(TreeStructurePackage)}\n```\n\n## Functions\n\n```go\nfunc NewCommand(ctx context.Context, name string) *cobra.Command\n```\n\n## Types\n\n```go\ntype TreeRunner struct {\n\tCommand *cobra.Command\n\tCtx     context.Context\n}\n```\nTreeRunner contains the run function\n\n```go\nfunc GetTreeRunner(ctx context.Context, name string) *TreeRunner\n```\n\n```go\ntype TreeStructure string\n```\n\n```go\ntype TreeWriter struct {\n\tWriter      io.Writer\n\tRoot        string\n\tFields      []TreeWriterField\n\tStructure   TreeStructure\n\tNonKRMFiles map[string][]string // root-relative dir → file basenames in that dir, or relative paths after roll-up from subdirs\n}\n```\nTreeWriter prints the package structured as a tree. TODO(pwittrock): test this package better.  it is lower-risk since it is only used for printing rather than updating or editing.\n\n```go\nfunc (p TreeWriter) Write(nodes []*yaml.RNode) error\n```\nWrite writes the ascii tree to p.Writer\n\n```go\ntype TreeWriterField struct {\n\tyaml.PathMatcher\n\tName    string\n\tSubName string\n}\n```\nTreeWriterField configures a Resource field to be included in the tree\n\n","path":"github.com/kptdev/kpt/cli/pkg/cmdtree","name":"cmdtree","synopsis":"","isRedistributable":true}
