aboutsummaryrefslogtreecommitdiffhomepage
path: root/vendor/github.com/armon/go-radix/README.md
diff options
context:
space:
mode:
authorAlex Pilon <apilon@hashicorp.com>2019-02-22 18:24:37 -0500
committerAlex Pilon <apilon@hashicorp.com>2019-02-22 18:24:37 -0500
commit15c0b25d011f37e7c20aeca9eaf461f78285b8d9 (patch)
tree255c250a5c9d4801c74092d33b7337d8c14438ff /vendor/github.com/armon/go-radix/README.md
parent07971ca38143c5faf951d152fba370ddcbe26ad5 (diff)
downloadterraform-provider-statuscake-15c0b25d011f37e7c20aeca9eaf461f78285b8d9.tar.gz
terraform-provider-statuscake-15c0b25d011f37e7c20aeca9eaf461f78285b8d9.tar.zst
terraform-provider-statuscake-15c0b25d011f37e7c20aeca9eaf461f78285b8d9.zip
deps: github.com/hashicorp/terraform@sdk-v0.11-with-go-modules
Updated via: go get github.com/hashicorp/terraform@sdk-v0.11-with-go-modules and go mod tidy
Diffstat (limited to 'vendor/github.com/armon/go-radix/README.md')
-rw-r--r--vendor/github.com/armon/go-radix/README.md38
1 files changed, 38 insertions, 0 deletions
diff --git a/vendor/github.com/armon/go-radix/README.md b/vendor/github.com/armon/go-radix/README.md
new file mode 100644
index 0000000..26f42a2
--- /dev/null
+++ b/vendor/github.com/armon/go-radix/README.md
@@ -0,0 +1,38 @@
1go-radix [![Build Status](https://travis-ci.org/armon/go-radix.png)](https://travis-ci.org/armon/go-radix)
2=========
3
4Provides the `radix` package that implements a [radix tree](http://en.wikipedia.org/wiki/Radix_tree).
5The package only provides a single `Tree` implementation, optimized for sparse nodes.
6
7As a radix tree, it provides the following:
8 * O(k) operations. In many cases, this can be faster than a hash table since
9 the hash function is an O(k) operation, and hash tables have very poor cache locality.
10 * Minimum / Maximum value lookups
11 * Ordered iteration
12
13For an immutable variant, see [go-immutable-radix](https://github.com/hashicorp/go-immutable-radix).
14
15Documentation
16=============
17
18The full documentation is available on [Godoc](http://godoc.org/github.com/armon/go-radix).
19
20Example
21=======
22
23Below is a simple example of usage
24
25```go
26// Create a tree
27r := radix.New()
28r.Insert("foo", 1)
29r.Insert("bar", 2)
30r.Insert("foobar", 2)
31
32// Find the longest prefix match
33m, _, _ := r.LongestPrefix("foozip")
34if m != "foo" {
35 panic("should be foo")
36}
37```
38