aboutsummaryrefslogtreecommitdiff
path: root/vendor/github.com/kr/pretty/example_test.go
diff options
context:
space:
mode:
authorChristine Dodrill <me@christine.website>2018-07-01 20:38:18 +0000
committerChristine Dodrill <me@christine.website>2018-07-01 20:38:18 +0000
commit6197f455f695eb959a932e15dc417c1b50a2255b (patch)
treeeb90c08ea8e688894b033668587635c6e350f13d /vendor/github.com/kr/pretty/example_test.go
parentb0e0b108231f9b71eebe68d8e9b99ca2846b4534 (diff)
downloadxesite-6197f455f695eb959a932e15dc417c1b50a2255b.tar.xz
xesite-6197f455f695eb959a932e15dc417c1b50a2255b.zip
vgo
Diffstat (limited to 'vendor/github.com/kr/pretty/example_test.go')
-rw-r--r--vendor/github.com/kr/pretty/example_test.go20
1 files changed, 20 insertions, 0 deletions
diff --git a/vendor/github.com/kr/pretty/example_test.go b/vendor/github.com/kr/pretty/example_test.go
new file mode 100644
index 0000000..ecf40f3
--- /dev/null
+++ b/vendor/github.com/kr/pretty/example_test.go
@@ -0,0 +1,20 @@
+package pretty_test
+
+import (
+ "fmt"
+ "github.com/kr/pretty"
+)
+
+func Example() {
+ type myType struct {
+ a, b int
+ }
+ var x = []myType{{1, 2}, {3, 4}, {5, 6}}
+ fmt.Printf("%# v", pretty.Formatter(x))
+ // output:
+ // []pretty_test.myType{
+ // {a:1, b:2},
+ // {a:3, b:4},
+ // {a:5, b:6},
+ // }
+}