### Install treeprint Package Source: https://github.com/xlab/treeprint/blob/master/README.md Use 'go get' to install the treeprint package. This command fetches and installs the package and its dependencies. ```bash $ go get github.com/xlab/treeprint ``` -------------------------------- ### Create New Tree with Default Root Source: https://context7.com/xlab/treeprint/llms.txt Use `treeprint.New()` to initialize a tree with the default root label ".". This is the standard starting point for manual tree construction. ```go package main import ( "fmt" "github.com/xlab/treeprint" ) func main() { tree := treeprint.New() tree.AddNode("file1.txt") tree.AddNode("file2.txt") fmt.Println(tree.String()) } ``` -------------------------------- ### Generate Tree Representation of Any Value Source: https://context7.com/xlab/treeprint/llms.txt The `Repr` function provides a convenient way to get a string representation of any value as a tree. For structs, it renders a `StructValueTree`, and for other types, it falls back to `fmt.Sprintf("%+v", v)`. ```go package main import ( "fmt" "github.com/xlab/treeprint" ) type Server struct { Name string Port int Options struct { TLS bool MaxConn int } } func main() { s := Server{Name: "api-server", Port: 443} s.Options.TLS = true s.Options.MaxConn = 100 fmt.Println(treeprint.Repr(s)) } ``` -------------------------------- ### Get Last Child Node with FindLastNode Source: https://context7.com/xlab/treeprint/llms.txt Returns the last child node of the current branch, or nil if the branch has no children. ```go package main import ( "fmt" "github.com/xlab/treeprint" ) func main() { tree := treeprint.New() tree.AddNode("first") tree.AddNode("second") tree.AddNode("third") last := tree.FindLastNode() if last != nil { fmt.Println("Last node value:", last.(*treeprint.Node).Value) } } ``` -------------------------------- ### Create and Print a Basic Tree Structure Source: https://github.com/xlab/treeprint/blob/master/README.md Initialize a new tree, add branches and nodes, and then print the resulting ASCII tree structure. Use treeprint.NewWithRoot() to set a custom root name. ```go func main() { // to add a custom root name use `treeprint.NewWithRoot()` instead tree := treeprint.New() // create a new branch in the root one := tree.AddBranch("one") // add some nodes one.AddNode("subnode1").AddNode("subnode2") // create a new sub-branch one.AddBranch("two"). AddNode("subnode1").AddNode("subnode2"). // add some nodes AddBranch("three"). // add a new sub-branch AddNode("subnode1").AddNode("subnode2") // add some nodes too // add one more node that should surround the inner branch one.AddNode("subnode3") // add a new node to the root tree.AddNode("outernode") fmt.Println(tree.String()) } ``` -------------------------------- ### Create Tree with Meta-Data Nodes Source: https://github.com/xlab/treeprint/blob/master/README.md Demonstrates adding nodes with associated meta-data, such as file sizes or counts, to the tree structure. This is useful for displaying file system-like information. ```go func main { // to add a custom root name use `treeprint.NewWithRoot()` instead tree := treeprint.New() tree.AddNode("Dockerfile") tree.AddNode("Makefile") tree.AddNode("aws.sh") tree.AddMetaBranch(" 204", "bin"). AddNode("dbmaker").AddNode("someserver").AddNode("testtool") tree.AddMetaBranch(" 374", "deploy"). AddNode("Makefile").AddNode("bootstrap.sh") tree.AddMetaNode("122K", "testtool.a") fmt.Println(tree.String()) } ``` -------------------------------- ### New() Tree Source: https://context7.com/xlab/treeprint/llms.txt Creates a new tree with a default root value of ".". This is the standard entry point for building trees manually. ```APIDOC ## New() Tree ### Description Creates a new tree with a default root value of ".". This is the standard entry point for building trees manually. ### Method `New()` ### Returns `Tree` - A new tree instance. ### Example ```go package main import ( "fmt" "github.com/xlab/treeprint" ) func main() { tree := treeprint.New() tree.AddNode("file1.txt") tree.AddNode("file2.txt") fmt.Println(tree.String()) } ``` ``` -------------------------------- ### Traverse Tree with VisitAll Source: https://context7.com/xlab/treeprint/llms.txt Performs a breadth-first traversal of the entire tree, calling the provided NodeVisitor function for every node. Useful for collecting values, transforming nodes, or analyzing the tree structure. ```go package main import ( "fmt" "github.com/xlab/treeprint" ) func main() { tree := treeprint.New() one := tree.AddBranch("one") one.AddNode("one-subnode1").AddNode("one-subnode2") one.AddBranch("two").AddNode("two-subnode1").AddNode("two-subnode2"). AddBranch("three").AddNode("three-subnode1").AddNode("three-subnode2") tree.AddNode("outernode") tree.VisitAll(func(item *treeprint.Node) { if len(item.Nodes) > 0 { fmt.Printf("[branch] %v\n", item.Value) } else { fmt.Printf("[leaf] %v\n", item.Value) } }) } ``` -------------------------------- ### VisitAll Source: https://context7.com/xlab/treeprint/llms.txt Performs a breadth-first traversal of the entire tree, calling the provided `NodeVisitor` function for every node. Useful for collecting values, transforming nodes, or analyzing the tree structure. ```APIDOC ## VisitAll ### Description Performs a breadth-first traversal of the entire tree, calling the provided `NodeVisitor` function for every node. Useful for collecting values, transforming nodes, or analyzing the tree structure. ### Method Signature `VisitAll(fn NodeVisitor)` ``` -------------------------------- ### Iterate Over Tree Nodes Source: https://github.com/xlab/treeprint/blob/master/README.md Shows how to traverse all nodes within a treeprint tree using the VisitAll method. The provided callback function is executed for each node, allowing inspection of node values and their children. ```go tree := New() one := tree.AddBranch("one") one.AddNode("one-subnode1").AddNode("one-subnode2") one.AddBranch("two").AddNode("two-subnode1").AddNode("two-subnode2"). AddBranch("three").AddNode("three-subnode1").AddNode("three-subnode2") tree.AddNode("outernode") // if you need to iterate over the whole tree // call `VisitAll` from your top root node. tree.VisitAll(func(item *node) { if len(item.Nodes) > 0 { // branch nodes fmt.Println(item.Value) // will output one, two, three } else { // leaf nodes fmt.Println(item.Value) // will output one-*, two-*, three-* and outernode } }) ``` -------------------------------- ### Create New Tree with Custom Root Source: https://context7.com/xlab/treeprint/llms.txt Use `treeprint.NewWithRoot()` to create a tree with a custom root label, instead of the default ".". This allows for more specific naming of the tree's origin. ```go package main import ( "fmt" "github.com/xlab/treeprint" ) func main() { tree := treeprint.NewWithRoot("myproject/") tree.AddNode("main.go") tree.AddNode("go.mod") fmt.Println(tree.String()) } ``` -------------------------------- ### Generate Tree from Struct with Custom Meta Source: https://context7.com/xlab/treeprint/llms.txt Use `FromStructWithMeta` to generate a tree from a struct, providing a custom `FmtFunc` to control how field metadata is displayed. The callback receives the field name and value, returning a formatted string and a boolean to indicate if the meta should be shown. ```go package main import ( "fmt" "github.com/xlab/treeprint" ) type Config struct { Host string Port int Debug bool Timeout float64 } func main() { cfg := Config{Host: "localhost", Port: 8080, Debug: true, Timeout: 30.5} tree, err := treeprint.FromStructWithMeta(cfg, func(name string, v interface{}) (string, bool) { // Show type and value together as meta return fmt.Sprintf("%T=%v", v, v), true }) if err != nil { panic(err) } fmt.Println(tree.String()) } ``` -------------------------------- ### Customize Tree Rendering Symbols and Indent Size Source: https://context7.com/xlab/treeprint/llms.txt Override package-level variables like EdgeTypeLink, EdgeTypeMid, EdgeTypeEnd, and IndentSize to globally change tree styles for a compact ASCII-only output. ```go package main import ( "fmt" "github.com/xlab/treeprint" ) func main() { // Override rendering symbols for a compact ASCII-only style treeprint.EdgeTypeLink = "|" treeprint.EdgeTypeMid = "+-" treeprint.EdgeTypeEnd = "+-" treeprint.IndentSize = 2 tree := treeprint.New() tree.AddBranch("one").AddNode("two") foo := tree.AddBranch("foo") foo.AddBranch("bar").AddNode("a").AddNode("b").AddNode("c") foo.AddNode("end") fmt.Println(tree.String()) } ``` -------------------------------- ### Render Tree to String or Bytes Source: https://context7.com/xlab/treeprint/llms.txt Renders the tree (or any subtree) into a Unicode ASCII string or byte slice. Can be called on any node, not just the root. ```go package main import ( "fmt" "os" "github.com/xlab/treeprint" ) func main() { tree := treeprint.New() tree.AddBranch("cmd").AddNode("main.go") tree.AddBranch("internal").AddNode("handler.go").AddNode("router.go") tree.AddNode("go.mod") // As string fmt.Println(tree.String()) // As bytes — write directly to stdout or any io.Writer os.Stdout.Write(tree.Bytes()) } ``` -------------------------------- ### Add Nested Branches and Nodes Source: https://context7.com/xlab/treeprint/llms.txt Use `AddBranch()` to create a new sub-tree and `AddNode()` to add leaf nodes. `AddBranch()` returns the new branch, allowing for the addition of nested children. ```go package main import ( "fmt" "github.com/xlab/treeprint" ) func main() { tree := treeprint.New() one := tree.AddBranch("one") one.AddNode("subnode1").AddNode("subnode2") one.AddBranch("two"). AddNode("subnode1").AddNode("subnode2"). AddBranch("three"). AddNode("subnode1").AddNode("subnode2") one.AddNode("subnode3") tree.AddNode("outernode") fmt.Println(tree.String()) } ``` -------------------------------- ### String / Bytes Source: https://context7.com/xlab/treeprint/llms.txt Renders the tree (or any subtree) into a Unicode ASCII string or byte slice. This method can be called on any node, not just the root. ```APIDOC ## String / Bytes ### Description Renders the tree (or any subtree) into a Unicode ASCII string or byte slice. Can be called on any node, not just the root. ### Method Signature `String() string` `Bytes() []byte` ``` -------------------------------- ### FromStructWithMeta Source: https://context7.com/xlab/treeprint/llms.txt Generates a tree from a struct using a custom FmtFunc callback to control the meta value for each field. The function receives the field name and value, and returns a formatted meta string and a boolean indicating whether to show the meta. ```APIDOC ## FromStructWithMeta(v interface{}, fmtFunc FmtFunc) (Tree, error) ### Description Generates a tree from a struct using a custom `FmtFunc` callback to control the meta value for each field. The function receives the field name and value, and returns a formatted meta string and a boolean indicating whether to show the meta. ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```go package main import ( "fmt" "github.com/xlab/treeprint" ) type Config struct { Host string Port int Debug bool Timeout float64 } func main() { cfg := Config{Host: "localhost", Port: 8080, Debug: true, Timeout: 30.5} tree, err := treeprint.FromStructWithMeta(cfg, func(name string, v interface{}) (string, bool) { // Show type and value together as meta return fmt.Sprintf("%T=%v", v, v), true }) if err != nil { panic(err) } fmt.Println(tree.String()) } ``` ### Response #### Success Response (200) - **Tree** (Tree) - The generated tree structure. - **error** (error) - An error if the tree generation fails. #### Response Example ``` . ├── [string=localhost] Host ├── [int=8080] Port ├── [bool=true] Debug └── [float64=30.5] Timeout ``` ``` -------------------------------- ### Add Sibling Nodes with Chaining Source: https://context7.com/xlab/treeprint/llms.txt The `AddNode()` method returns the parent tree, enabling chained calls to add multiple sibling nodes at the same level. This simplifies adding a series of related items. ```go package main import ( "fmt" "github.com/xlab/treeprint" ) func main() { tree := treeprint.New() // Chained AddNode calls all add siblings at the same level tree.AddNode("alpha").AddNode("beta").AddNode("gamma") fmt.Println(tree.String()) } ``` -------------------------------- ### Add Leaf Nodes with Metadata Source: https://context7.com/xlab/treeprint/llms.txt Use `AddMetaNode()` to add a leaf node with associated metadata, displayed in brackets before the node label. Metadata can be any type that can be converted to a string. ```go package main import ( "fmt" "github.com/xlab/treeprint" ) func main() { tree := treeprint.New() tree.AddNode("Dockerfile") tree.AddNode("Makefile") tree.AddMetaNode("122K", "testtool.a") tree.AddMetaNode(42, "answer.txt") fmt.Println(tree.String()) } ``` -------------------------------- ### Add Branch Nodes with Metadata Source: https://context7.com/xlab/treeprint/llms.txt Use `AddMetaBranch()` to add a branch node with associated metadata. This is useful for annotating branches (like directories) with information such as size or permissions. It returns the new branch for adding children. ```go package main import ( "fmt" "github.com/xlab/treeprint" ) func main() { tree := treeprint.New() tree.AddNode("Dockerfile") tree.AddMetaBranch(" 204", "bin"). AddNode("dbmaker").AddNode("someserver").AddNode("testtool") tree.AddMetaBranch(" 374", "deploy"). AddNode("Makefile").AddNode("bootstrap.sh") tree.AddMetaNode("122K", "testtool.a") fmt.Println(tree.String()) } ``` -------------------------------- ### Handle Multiline Node Values in Tree Printing Source: https://context7.com/xlab/treeprint/llms.txt Node values with newline characters are automatically padded to ensure continuation lines align correctly with the tree structure, including handling multiple empty lines. ```go package main import ( "fmt" "github.com/xlab/treeprint" ) func main() { tree := treeprint.New() tree.AddBranch("one").AddMetaNode("meta", "I am\na multiline\nvalue") foo := tree.AddBranch("foo") foo.AddBranch("bar").AddNode("a").AddNode("I have\nmany\n\nempty lines").AddNode("c") foo.AddBranch("I am another\nmultiple\nlines value") fmt.Println(tree.String()) } ``` -------------------------------- ### Repr Source: https://context7.com/xlab/treeprint/llms.txt Convenience function that returns a string representation of any value as a tree. For structs it renders a `StructValueTree`; for non-struct values it falls back to `fmt.Sprintf("%+v", v)`. ```APIDOC ## Repr(v interface{}) string ### Description Convenience function that returns a string representation of any value as a tree. For structs it renders a `StructValueTree`; for non-struct values it falls back to `fmt.Sprintf("%+v", v)`. ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ```go package main import ( "fmt" "github.com/xlab/treeprint" ) type Server struct { Name string Port int Options struct { TLS bool MaxConn int } } func main() { s := Server{Name: "api-server", Port: 443} s.Options.TLS = true s.Options.MaxConn = 100 fmt.Println(treeprint.Repr(s)) } ``` ### Response #### Success Response (200) - **string** (string) - The string representation of the value as a tree. #### Response Example ``` . ├── [api-server] Name ├── [443] Port └── Options ├── [true] TLS └── [100] MaxConn ``` ``` -------------------------------- ### NewWithRoot(root Value) Tree Source: https://context7.com/xlab/treeprint/llms.txt Creates a new tree with a custom root label instead of the default ".". ```APIDOC ## NewWithRoot(root Value) Tree ### Description Creates a new tree with a custom root label instead of the default ".". ### Method `NewWithRoot(root Value) Tree` ### Parameters #### Path Parameters - **root** (Value) - Required - The custom root label for the tree. ### Returns `Tree` - A new tree instance with the specified root. ### Example ```go package main import ( "fmt" "github.com/xlab/treeprint" ) func main() { tree := treeprint.NewWithRoot("myproject/") tree.AddNode("main.go") tree.AddNode("go.mod") fmt.Println(tree.String()) } ``` ``` -------------------------------- ### Generate Tree from Struct with Field Names Source: https://context7.com/xlab/treeprint/llms.txt Generates a tree representation of a Go struct, displaying only the field names. Uses reflection and supports struct tags for renaming or omitting fields. ```go package main import ( "fmt" "github.com/xlab/treeprint" ) type Address struct { Street string City string Zip string `tree:",omitempty"` } type Person struct { Name string `tree:"name"` Age int `tree:"age"` Hidden string `tree:"-"` // excluded from tree Address Address } func main() { p := Person{Name: "Alice", Age: 30, Hidden: "secret"} p.Address.Street = "123 Main St" p.Address.City = "Springfield" // p.Address.Zip is empty → omitted due to omitempty // Field names tree nameTree, _ := treeprint.FromStruct(p, treeprint.StructNameTree) fmt.Println("=== StructNameTree ===") fmt.Println(nameTree.String()) // Field values tree valueTree, _ := treeprint.FromStruct(p, treeprint.StructValueTree) fmt.Println("=== StructValueTree ===") fmt.Println(valueTree.String()) // Field types tree typeTree, _ := treeprint.FromStruct(p, treeprint.StructTypeTree) fmt.Println("=== StructTypeTree ===") fmt.Println(typeTree.String()) // Type sizes tree sizeTree, _ := treeprint.FromStruct(p, treeprint.StructTypeSizeTree) fmt.Println("=== StructTypeSizeTree ===") fmt.Println(sizeTree.String()) } ``` -------------------------------- ### Find Node by Value or Meta Source: https://context7.com/xlab/treeprint/llms.txt Searches the tree recursively for a node whose value or meta value matches using reflect.DeepEqual. Returns nil if not found. ```go package main import ( "fmt" "github.com/xlab/treeprint" ) func main() { tree := treeprint.New() tree.AddMetaBranch("drwxr-xr-x", "src"). AddNode("main.go").AddNode("util.go") tree.AddMetaBranch("drwxr-xr-x", "test"). AddNode("main_test.go") node := tree.FindByValue("src") if node != nil { fmt.Println("Found:", node.String()) } metaNode := tree.FindByMeta("drwxr-xr-x") if metaNode != nil { fmt.Println("Found by meta:", metaNode.(*treeprint.Node).Value) } } ``` -------------------------------- ### AddMetaBranch(meta MetaValue, v Value) Tree Source: https://context7.com/xlab/treeprint/llms.txt Adds a branch node with associated metadata. Returns the new branch, so children can be added to it. Useful for annotating directories with sizes, permissions, or other attributes. ```APIDOC ## AddMetaBranch(meta MetaValue, v Value) Tree ### Description Adds a branch node with associated metadata. Returns the new branch, so children can be added to it. Useful for annotating directories with sizes, permissions, or other attributes. ### Method `AddMetaBranch(meta MetaValue, v Value) Tree` ### Parameters #### Path Parameters - **meta** (MetaValue) - Required - The metadata to associate with the branch. - **v** (Value) - Required - The value of the branch node to add. ### Returns `Tree` - The newly created branch, allowing for nested additions. ### Example ```go package main import ( "fmt" "github.com/xlab/treeprint" ) func main() { tree := treeprint.New() tree.AddNode("Dockerfile") tree.AddMetaBranch(" 204", "bin"). AddNode("dbmaker").AddNode("someserver").AddNode("testtool") tree.AddMetaBranch(" 374", "deploy"). AddNode("Makefile").AddNode("bootstrap.sh") tree.AddMetaNode("122K", "testtool.a") fmt.Println(tree.String()) } ``` ``` -------------------------------- ### Rename Node Value with SetValue Source: https://context7.com/xlab/treeprint/llms.txt Mutates the value of an existing node in-place, including the root. Useful for renaming a node after construction. ```go package main import ( "fmt" "github.com/xlab/treeprint" ) func main() { tree := treeprint.New() tree.AddBranch("hello").AddNode("my friend").AddNode("lol") tree.AddNode("world") tree.SetValue("friends") // rename root from "." to "friends" fmt.Println(tree.String()) } ``` -------------------------------- ### AddMetaNode(meta MetaValue, v Value) Tree Source: https://context7.com/xlab/treeprint/llms.txt Adds a leaf node with an associated metadata value displayed in brackets before the node label. Returns the parent tree. ```APIDOC ## AddMetaNode(meta MetaValue, v Value) Tree ### Description Adds a leaf node with an associated metadata value displayed in brackets before the node label. Returns the parent tree. ### Method `AddMetaNode(meta MetaValue, v Value) Tree` ### Parameters #### Path Parameters - **meta** (MetaValue) - Required - The metadata to associate with the node. - **v** (Value) - Required - The value of the node to add. ### Returns `Tree` - The parent tree. ### Example ```go package main import ( "fmt" "github.com/xlab/treeprint" ) func main() { tree := treeprint.New() tree.AddNode("Dockerfile") tree.AddNode("Makefile") tree.AddMetaNode("122K", "testtool.a") tree.AddMetaNode(42, "answer.txt") fmt.Println(tree.String()) } ``` ``` -------------------------------- ### Detach Subtree with Branch Source: https://context7.com/xlab/treeprint/llms.txt Converts a leaf node into a standalone branch root by detaching it from its parent. Primarily used for rendering subtrees independently. ```go package main import ( "fmt" "github.com/xlab/treeprint" ) func main() { tree := treeprint.New() sub := tree.AddBranch("subdir") sub.AddNode("a.go") sub.AddNode("b.go") // Render just the subtree as a standalone root standalone := sub.Branch() fmt.Println(standalone.String()) } ``` -------------------------------- ### FindByValue / FindByMeta Source: https://context7.com/xlab/treeprint/llms.txt Searches the tree recursively for a node whose value or meta value matches using `reflect.DeepEqual`. Returns `nil` if the node is not found. ```APIDOC ## FindByValue / FindByMeta ### Description Searches the tree recursively for a node whose value or meta value matches (using `reflect.DeepEqual`). Returns `nil` if not found. ### Method Signature `FindByValue(value Value) Tree` `FindByMeta(meta MetaValue) Tree` ``` -------------------------------- ### Branch Source: https://context7.com/xlab/treeprint/llms.txt Converts a leaf node into a standalone branch root by detaching it from its parent. Primarily used for rendering subtrees independently. ```APIDOC ## Branch ### Description Converts a leaf node into a standalone branch root (detaches it from its parent by setting `Root` to nil). Primarily used for rendering subtrees independently. ### Method Signature `Branch() Tree` ``` -------------------------------- ### AddNode(v Value) Tree Source: https://context7.com/xlab/treeprint/llms.txt Adds a leaf node at the current branch level. Returns the parent tree (not the new node), enabling flat chaining of siblings. ```APIDOC ## AddNode(v Value) Tree ### Description Adds a leaf node at the current branch level. Returns the parent tree (not the new node), enabling flat chaining of siblings. ### Method `AddNode(v Value) Tree` ### Parameters #### Path Parameters - **v** (Value) - Required - The value of the node to add. ### Returns `Tree` - The parent tree, allowing for chained additions of siblings. ### Example ```go package main import ( "fmt" "github.com/xlab/treeprint" ) func main() { tree := treeprint.New() // Chained AddNode calls all add siblings at the same level tree.AddNode("alpha").AddNode("beta").AddNode("gamma") fmt.Println(tree.String()) } ``` ``` -------------------------------- ### SetValue / SetMetaValue Source: https://context7.com/xlab/treeprint/llms.txt Mutates the value or meta value of an existing node in-place. This is useful for renaming a node after it has been constructed. ```APIDOC ## SetValue / SetMetaValue ### Description Mutates the value or meta value of an existing node in-place, including the root node. Useful for renaming a node after construction. ### Method Signature `SetValue(value Value)` `SetMetaValue(meta MetaValue)` ``` -------------------------------- ### FindLastNode Source: https://context7.com/xlab/treeprint/llms.txt Returns the last child node of the current branch. Returns `nil` if the branch has no children. ```APIDOC ## FindLastNode ### Description Returns the last child node of the current branch, or `nil` if the branch has no children. ### Method Signature `FindLastNode() Tree` ``` -------------------------------- ### AddBranch(v Value) Tree Source: https://context7.com/xlab/treeprint/llms.txt Adds a new branch (sub-tree) node one level deeper. Returns the new branch, allowing nested children to be added to it. ```APIDOC ## AddBranch(v Value) Tree ### Description Adds a new branch (sub-tree) node one level deeper. Returns the new branch, allowing nested children to be added to it. ### Method `AddBranch(v Value) Tree` ### Parameters #### Path Parameters - **v** (Value) - Required - The value of the branch node to add. ### Returns `Tree` - The newly created branch, allowing for nested additions. ### Example ```go package main import ( "fmt" "github.com/xlab/treeprint" ) func main() { tree := treeprint.New() one := tree.AddBranch("one") one.AddNode("subnode1").AddNode("subnode2") one.AddBranch("two"). AddNode("subnode1").AddNode("subnode2"). AddBranch("three"). AddNode("subnode1").AddNode("subnode2") one.AddNode("subnode3") tree.AddNode("outernode") fmt.Println(tree.String()) } ``` ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.