Repository: CloudyKit/jet
Pull request #121 (2019-12-30 22:49:34)

Add Go modules and use v3
Because of upcoming backwards-incompatible changes I went ahead and used `v3` while adding Go modules.


Patch:
diff --git a/.travis.yml b/.travis.yml
index c7a1653..0b2bade 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,8 +1,8 @@
 language: go
 go:
- - "1.9.x"
- - "1.10.x"
+ - "1.12.x"
+ - "1.13.x"
  - "tip"
 
 script:
- - go test -v ./...
+ - env GO111MODULE=on go test -v ./...
diff --git a/appveyor.yml b/appveyor.yml
index 700c6e0..b8dc942 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -10,9 +10,10 @@ clone_folder: c:\gopath\src\github.com\CloudyKit\jet
 
 environment:
   GOPATH: c:\gopath
+  GO111MODULE: on
   matrix:
-    - GOVERSION: 19
-    - GOVERSION: 110
+    - GOVERSION: 112
+    - GOVERSION: 113
 
 install:
   - set PATH=%GOPATH%\bin;c:\go%GOVERSION%\bin;%PATH%
diff --git a/eval.go b/eval.go
index b30c67e..aa5bd43 100644
--- a/eval.go
+++ b/eval.go
@@ -134,7 +134,7 @@ func (st *Runtime) YieldTemplate(name string, context interface{}) {
 
 	t, err := st.set.GetTemplate(name)
 	if err != nil {
-		panic(fmt.Errorf("include: template %q was not found", name))
+		panic(fmt.Errorf("include: template %q was not found: %s", name, err))
 	}
 
 	st.newScope()
diff --git a/examples/asset_packaging/main.go b/examples/asset_packaging/main.go
index 04af279..0ec1390 100644
--- a/examples/asset_packaging/main.go
+++ b/examples/asset_packaging/main.go
@@ -27,10 +27,10 @@ import (
 	"strings"
 	"time"
 
-	"github.com/CloudyKit/jet"
-	"github.com/CloudyKit/jet/examples/asset_packaging/assets/templates"
-	"github.com/CloudyKit/jet/loaders/httpfs"
-	"github.com/CloudyKit/jet/loaders/multi"
+	"github.com/CloudyKit/jet/v3"
+	"github.com/CloudyKit/jet/v3/examples/asset_packaging/assets/templates"
+	"github.com/CloudyKit/jet/v3/loaders/httpfs"
+	"github.com/CloudyKit/jet/v3/loaders/multi"
 )
 
 // Initialize the set with both local files as well as the packaged
diff --git a/examples/todos/main.go b/examples/todos/main.go
index 77d1121..6a15e39 100644
--- a/examples/todos/main.go
+++ b/examples/todos/main.go
@@ -25,7 +25,7 @@ import (
 	"reflect"
 	"strings"
 
-	"github.com/CloudyKit/jet"
+	"github.com/CloudyKit/jet/v3"
 )
 
 var views = jet.NewHTMLSet("./views")
diff --git a/go.mod b/go.mod
new file mode 100644
index 0000000..9654b6a
--- /dev/null
+++ b/go.mod
@@ -0,0 +1,7 @@
+module github.com/CloudyKit/jet/v3
+
+go 1.12
+
+require github.com/CloudyKit/fastprinter v0.0.0-20170127035650-74b38d55f37a
+
+replace github.com/CloudyKit/fastprinter => github.com/annismckenzie/fastprinter v0.0.0-20180721091441-b9f2fb63ce50 // PR 1 at https://github.com/CloudyKit/fastprinter/pull/1
diff --git a/go.sum b/go.sum
new file mode 100644
index 0000000..054e34a
--- /dev/null
+++ b/go.sum
@@ -0,0 +1,2 @@
+github.com/annismckenzie/fastprinter v0.0.0-20180721091441-b9f2fb63ce50 h1:SOQHYHI8DAjvAA/j8JnGoJJNnRBQmMLlm24ey4GdFvY=
+github.com/annismckenzie/fastprinter v0.0.0-20180721091441-b9f2fb63ce50/go.mod h1:mALEYWfUtOXobHPI5r4jg8ZLRAXVUBiZGFtM3CTnYqg=
diff --git a/loaders/httpfs/loader.go b/loaders/httpfs/loader.go
index 004a60a..33c879c 100644
--- a/loaders/httpfs/loader.go
+++ b/loaders/httpfs/loader.go
@@ -5,7 +5,7 @@ import (
 	"net/http"
 	"os"
 
-	"github.com/CloudyKit/jet"
+	"github.com/CloudyKit/jet/v3"
 )
 
 type httpFileSystemLoader struct {
diff --git a/loaders/multi/multi.go b/loaders/multi/multi.go
index c620d68..74fae55 100644
--- a/loaders/multi/multi.go
+++ b/loaders/multi/multi.go
@@ -4,7 +4,7 @@ import (
 	"io"
 	"os"
 
-	"github.com/CloudyKit/jet"
+	"github.com/CloudyKit/jet/v3"
 )
 
 // Multi implements jet.Loader interface and tries to load templates from a list of custom loaders.
diff --git a/utils/visitor.go b/utils/visitor.go
index 8890f95..454f45c 100644
--- a/utils/visitor.go
+++ b/utils/visitor.go
@@ -3,7 +3,7 @@ package utils
 import (
 	"fmt"
 
-	"github.com/CloudyKit/jet"
+	"github.com/CloudyKit/jet/v3"
 )
 
 // Walk walks the template ast and calls the Visit method on each node of the tree
diff --git a/vendor/github.com/CloudyKit/fastprinter/LICENSE b/vendor/github.com/CloudyKit/fastprinter/LICENSE
deleted file mode 100644
index 8dada3e..0000000
--- a/vendor/github.com/CloudyKit/fastprinter/LICENSE
+++ /dev/null
@@ -1,201 +0,0 @@
-                                 Apache License
-                           Version 2.0, January 2004
-                        http://www.apache.org/licenses/
-
-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-   1. Definitions.
-
-      "License" shall mean the terms and conditions for use, reproduction,
-      and distribution as defined by Sections 1 through 9 of this document.
-
-      "Licensor" shall mean the copyright owner or entity authorized by
-      the copyright owner that is granting the License.
-
-      "Legal Entity" shall mean the union of the acting entity and all
-      other entities that control, are controlled by, or are under common
-      control with that entity. For the purposes of this definition,
-      "control" means (i) the power, direct or indirect, to cause the
-      direction or management of such entity, whether by contract or
-      otherwise, or (ii) ownership of fifty percent (50%) or more of the
-      outstanding shares, or (iii) beneficial ownership of such entity.
-
-      "You" (or "Your") shall mean an individual or Legal Entity
-      exercising permissions granted by this License.
-
-      "Source" form shall mean the preferred form for making modifications,
-      including but not limited to software source code, documentation
-      source, and configuration files.
-
-      "Object" form shall mean any form resulting from mechanical
-      transformation or translation of a Source form, including but
-      not limited to compiled object code, generated documentation,
-      and conversions to other media types.
-
-      "Work" shall mean the work of authorship, whether in Source or
-      Object form, made available under the License, as indicated by a
-      copyright notice that is included in or attached to the work
-      (an example is provided in the Appendix below).
-
-      "Derivative Works" shall mean any work, whether in Source or Object
-      form, that is based on (or derived from) the Work and for which the
-      editorial revisions, annotations, elaborations, or other modifications
-      represent, as a whole, an original work of authorship. For the purposes
-      of this License, Derivative Works shall not include works that remain
-      separable from, or merely link (or bind by name) to the interfaces of,
-      the Work and Derivative Works thereof.
-
-      "Contribution" shall mean any work of authorship, including
-      the original version of the Work and any modifications or additions
-      to that Work or Derivative Works thereof, that is intentionally
-      submitted to Licensor for inclusion in the Work by the copyright owner
-      or by an individual or Legal Entity authorized to submit on behalf of
-      the copyright owner. For the purposes of this definition, "submitted"
-      means any form of electronic, verbal, or written communication sent
-      to the Licensor or its representatives, including but not limited to
-      communication on electronic mailing lists, source code control systems,
-      and issue tracking systems that are managed by, or on behalf of, the
-      Licensor for the purpose of discussing and improving the Work, but
-      excluding communication that is conspicuously marked or otherwise
-      designated in writing by the copyright owner as "Not a Contribution."
-
-      "Contributor" shall mean Licensor and any individual or Legal Entity
-      on behalf of whom a Contribution has been received by Licensor and
-      subsequently incorporated within the Work.
-
-   2. Grant of Copyright License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      copyright license to reproduce, prepare Derivative Works of,
-      publicly display, publicly perform, sublicense, and distribute the
-      Work and such Derivative Works in Source or Object form.
-
-   3. Grant of Patent License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      (except as stated in this section) patent license to make, have made,
-      use, offer to sell, sell, import, and otherwise transfer the Work,
-      where such license applies only to those patent claims licensable
-      by such Contributor that are necessarily infringed by their
-      Contribution(s) alone or by combination of their Contribution(s)
-      with the Work to which such Contribution(s) was submitted. If You
-      institute patent litigation against any entity (including a
-      cross-claim or counterclaim in a lawsuit) alleging that the Work
-      or a Contribution incorporated within the Work constitutes direct
-      or contributory patent infringement, then any patent licenses
-      granted to You under this License for that Work shall terminate
-      as of the date such litigation is filed.
-
-   4. Redistribution. You may reproduce and distribute copies of the
-      Work or Derivative Works thereof in any medium, with or without
-      modifications, and in Source or Object form, provided that You
-      meet the following conditions:
-
-      (a) You must give any other recipients of the Work or
-          Derivative Works a copy of this License; and
-
-      (b) You must cause any modified files to carry prominent notices
-          stating that You changed the files; and
-
-      (c) You must retain, in the Source form of any Derivative Works
-          that You distribute, all copyright, patent, trademark, and
-          attribution notices from the Source form of the Work,
-          excluding those notices that do not pertain to any part of
-          the Derivative Works; and
-
-      (d) If the Work includes a "NOTICE" text file as part of its
-          distribution, then any Derivative Works that You distribute must
-          include a readable copy of the attribution notices contained
-          within such NOTICE file, excluding those notices that do not
-          pertain to any part of the Derivative Works, in at least one
-          of the following places: within a NOTICE text file distributed
-          as part of the Derivative Works; within the Source form or
-          documentation, if provided along with the Derivative Works; or,
-          within a display generated by the Derivative Works, if and
-          wherever such third-party notices normally appear. The contents
-          of the NOTICE file are for informational purposes only and
-          do not modify the License. You may add Your own attribution
-          notices within Derivative Works that You distribute, alongside
-          or as an addendum to the NOTICE text from the Work, provided
-          that such additional attribution notices cannot be construed
-          as modifying the License.
-
-      You may add Your own copyright statement to Your modifications and
-      may provide additional or different license terms and conditions
-      for use, reproduction, or distribution of Your modifications, or
-      for any such Derivative Works as a whole, provided Your use,
-      reproduction, and distribution of the Work otherwise complies with
-      the conditions stated in this License.
-
-   5. Submission of Contributions. Unless You explicitly state otherwise,
-      any Contribution intentionally submitted for inclusion in the Work
-      by You to the Licensor shall be under the terms and conditions of
-      this License, without any additional terms or conditions.
-      Notwithstanding the above, nothing herein shall supersede or modify
-      the terms of any separate license agreement you may have executed
-      with Licensor regarding such Contributions.
-
-   6. Trademarks. This License does not grant permission to use the trade
-      names, trademarks, service marks, or product names of the Licensor,
-      except as required for reasonable and customary use in describing the
-      origin of the Work and reproducing the content of the NOTICE file.
-
-   7. Disclaimer of Warranty. Unless required by applicable law or
-      agreed to in writing, Licensor provides the Work (and each
-      Contributor provides its Contributions) on an "AS IS" BASIS,
-      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-      implied, including, without limitation, any warranties or conditions
-      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-      PARTICULAR PURPOSE. You are solely responsible for determining the
-      appropriateness of using or redistributing the Work and assume any
-      risks associated with Your exercise of permissions under this License.
-
-   8. Limitation of Liability. In no event and under no legal theory,
-      whether in tort (including negligence), contract, or otherwise,
-      unless required by applicable law (such as deliberate and grossly
-      negligent acts) or agreed to in writing, shall any Contributor be
-      liable to You for damages, including any direct, indirect, special,
-      incidental, or consequential damages of any character arising as a
-      result of this License or out of the use or inability to use the
-      Work (including but not limited to damages for loss of goodwill,
-      work stoppage, computer failure or malfunction, or any and all
-      other commercial damages or losses), even if such Contributor
-      has been advised of the possibility of such damages.
-
-   9. Accepting Warranty or Additional Liability. While redistributing
-      the Work or Derivative Works thereof, You may choose to offer,
-      and charge a fee for, acceptance of support, warranty, indemnity,
-      or other liability obligations and/or rights consistent with this
-      License. However, in accepting such obligations, You may act only
-      on Your own behalf and on Your sole responsibility, not on behalf
-      of any other Contributor, and only if You agree to indemnify,
-      defend, and hold each Contributor harmless for any liability
-      incurred by, or claims asserted against, such Contributor by reason
-      of your accepting any such warranty or additional liability.
-
-   END OF TERMS AND CONDITIONS
-
-   APPENDIX: How to apply the Apache License to your work.
-
-      To apply the Apache License to your work, attach the following
-      boilerplate notice, with the fields enclosed by brackets "{}"
-      replaced with your own identifying information. (Don't include
-      the brackets!)  The text should be enclosed in the appropriate
-      comment syntax for the file format. We also recommend that a
-      file or class name and description of purpose be included on the
-      same "printed page" as the copyright notice for easier
-      identification within third-party archives.
-
-   Copyright {yyyy} {name of copyright owner}
-
-   Licensed under the Apache License, Version 2.0 (the "License");
-   you may not use this file except in compliance with the License.
-   You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.
diff --git a/vendor/github.com/CloudyKit/fastprinter/README.md b/vendor/github.com/CloudyKit/fastprinter/README.md
deleted file mode 100644
index 2078fd2..0000000
--- a/vendor/github.com/CloudyKit/fastprinter/README.md
+++ /dev/null
@@ -1,2 +0,0 @@
-# fastprinter
-FastPrinter supports write values in io.Writer without allocation
diff --git a/vendor/github.com/CloudyKit/fastprinter/decimal.go b/vendor/github.com/CloudyKit/fastprinter/decimal.go
deleted file mode 100644
index 078297f..0000000
--- a/vendor/github.com/CloudyKit/fastprinter/decimal.go
+++ /dev/null
@@ -1,369 +0,0 @@
-// Copyright 2009 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-// Multiprecision decimal numbers.
-// For floating-point formatting only; not general purpose.
-// Only operations are assign and (binary) left/right shift.
-// Can do binary floating point in multiprecision decimal precisely
-// because 2 divides 10; cannot do decimal floating point
-// in multiprecision binary precisely.
-
-package fastprinter
-
-type decimal struct {
-	d     [800]byte // digits, big-endian representation
-	nd    int       // number of digits used
-	dp    int       // decimal point
-	neg   bool
-	trunc bool // discarded nonzero digits beyond d[:nd]
-}
-
-// trim trailing zeros from number.
-// (They are meaningless; the decimal point is tracked
-// independent of the number of digits.)
-func trim(a *decimal) {
-	for a.nd > 0 && a.d[a.nd-1] == '0' {
-		a.nd--
-	}
-	if a.nd == 0 {
-		a.dp = 0
-	}
-}
-
-// Assign v to a.
-func (a *decimal) Assign(v uint64) {
-	var buf [24]byte
-
-	// Write reversed decimal in buf.
-	n := 0
-	for v > 0 {
-		v1 := v / 10
-		v -= 10 * v1
-		buf[n] = byte(v + '0')
-		n++
-		v = v1
-	}
-
-	// Reverse again to produce forward decimal in a.d.
-	a.nd = 0
-	for n--; n >= 0; n-- {
-		a.d[a.nd] = buf[n]
-		a.nd++
-	}
-	a.dp = a.nd
-	trim(a)
-}
-
-// Maximum shift that we can do in one pass without overflow.
-// A uint has 32 or 64 bits, and we have to be able to accommodate 9<<k.
-const uintSize = 32 << (^uint(0) >> 63)
-const maxShift = uintSize - 4
-
-// Binary shift right (/ 2) by k bits.  k <= maxShift to avoid overflow.
-func rightShift(a *decimal, k uint) {
-	r := 0 // read pointer
-	w := 0 // write pointer
-
-	// Pick up enough leading digits to cover first shift.
-	var n uint
-	for ; n>>k == 0; r++ {
-		if r >= a.nd {
-			if n == 0 {
-				// a == 0; shouldn't get here, but handle anyway.
-				a.nd = 0
-				return
-			}
-			for n>>k == 0 {
-				n = n * 10
-				r++
-			}
-			break
-		}
-		c := uint(a.d[r])
-		n = n*10 + c - '0'
-	}
-	a.dp -= r - 1
-
-	// Pick up a digit, put down a digit.
-	for ; r < a.nd; r++ {
-		c := uint(a.d[r])
-		dig := n >> k
-		n -= dig << k
-		a.d[w] = byte(dig + '0')
-		w++
-		n = n*10 + c - '0'
-	}
-
-	// Put down extra digits.
-	for n > 0 {
-		dig := n >> k
-		n -= dig << k
-		if w < len(a.d) {
-			a.d[w] = byte(dig + '0')
-			w++
-		} else if dig > 0 {
-			a.trunc = true
-		}
-		n = n * 10
-	}
-
-	a.nd = w
-	trim(a)
-}
-
-// Cheat sheet for left shift: table indexed by shift count giving
-// number of new digits that will be introduced by that shift.
-//
-// For example, leftcheats[4] = {2, "625"}.  That means that
-// if we are shifting by 4 (multiplying by 16), it will add 2 digits
-// when the string prefix is "625" through "999", and one fewer digit
-// if the string prefix is "000" through "624".
-//
-// Credit for this trick goes to Ken.
-
-type leftCheat struct {
-	delta  int    // number of new digits
-	cutoff string // minus one digit if original < a.
-}
-
-var leftcheats = []leftCheat{
-	// Leading digits of 1/2^i = 5^i.
-	// 5^23 is not an exact 64-bit floating point number,
-	// so have to use bc for the math.
-	// Go up to 60 to be large enough for 32bit and 64bit platforms.
-	/*
-		seq 60 | sed 's/^/5^/' | bc |
-		awk 'BEGIN{ print "\t{ 0, \"\" }," }
-		{
-			log2 = log(2)/log(10)
-			printf("\t{ %d, \"%s\" },\t// * %d\n",
-				int(log2*NR+1), $0, 2**NR)
-		}'
-	*/
-	{0, ""},
-	{1, "5"},                                           // * 2
-	{1, "25"},                                          // * 4
-	{1, "125"},                                         // * 8
-	{2, "625"},                                         // * 16
-	{2, "3125"},                                        // * 32
-	{2, "15625"},                                       // * 64
-	{3, "78125"},                                       // * 128
-	{3, "390625"},                                      // * 256
-	{3, "1953125"},                                     // * 512
-	{4, "9765625"},                                     // * 1024
-	{4, "48828125"},                                    // * 2048
-	{4, "244140625"},                                   // * 4096
-	{4, "1220703125"},                                  // * 8192
-	{5, "6103515625"},                                  // * 16384
-	{5, "30517578125"},                                 // * 32768
-	{5, "152587890625"},                                // * 65536
-	{6, "762939453125"},                                // * 131072
-	{6, "3814697265625"},                               // * 262144
-	{6, "19073486328125"},                              // * 524288
-	{7, "95367431640625"},                              // * 1048576
-	{7, "476837158203125"},                             // * 2097152
-	{7, "2384185791015625"},                            // * 4194304
-	{7, "11920928955078125"},                           // * 8388608
-	{8, "59604644775390625"},                           // * 16777216
-	{8, "298023223876953125"},                          // * 33554432
-	{8, "1490116119384765625"},                         // * 67108864
-	{9, "7450580596923828125"},                         // * 134217728
-	{9, "37252902984619140625"},                        // * 268435456
-	{9, "186264514923095703125"},                       // * 536870912
-	{10, "931322574615478515625"},                      // * 1073741824
-	{10, "4656612873077392578125"},                     // * 2147483648
-	{10, "23283064365386962890625"},                    // * 4294967296
-	{10, "116415321826934814453125"},                   // * 8589934592
-	{11, "582076609134674072265625"},                   // * 17179869184
-	{11, "2910383045673370361328125"},                  // * 34359738368
-	{11, "14551915228366851806640625"},                 // * 68719476736
-	{12, "72759576141834259033203125"},                 // * 137438953472
-	{12, "363797880709171295166015625"},                // * 274877906944
-	{12, "1818989403545856475830078125"},               // * 549755813888
-	{13, "9094947017729282379150390625"},               // * 1099511627776
-	{13, "45474735088646411895751953125"},              // * 2199023255552
-	{13, "227373675443232059478759765625"},             // * 4398046511104
-	{13, "1136868377216160297393798828125"},            // * 8796093022208
-	{14, "5684341886080801486968994140625"},            // * 17592186044416
-	{14, "28421709430404007434844970703125"},           // * 35184372088832
-	{14, "142108547152020037174224853515625"},          // * 70368744177664
-	{15, "710542735760100185871124267578125"},          // * 140737488355328
-	{15, "3552713678800500929355621337890625"},         // * 281474976710656
-	{15, "17763568394002504646778106689453125"},        // * 562949953421312
-	{16, "88817841970012523233890533447265625"},        // * 1125899906842624
-	{16, "444089209850062616169452667236328125"},       // * 2251799813685248
-	{16, "2220446049250313080847263336181640625"},      // * 4503599627370496
-	{16, "11102230246251565404236316680908203125"},     // * 9007199254740992
-	{17, "55511151231257827021181583404541015625"},     // * 18014398509481984
-	{17, "277555756156289135105907917022705078125"},    // * 36028797018963968
-	{17, "1387778780781445675529539585113525390625"},   // * 72057594037927936
-	{18, "6938893903907228377647697925567626953125"},   // * 144115188075855872
-	{18, "34694469519536141888238489627838134765625"},  // * 288230376151711744
-	{18, "173472347597680709441192448139190673828125"}, // * 576460752303423488
-	{19, "867361737988403547205962240695953369140625"}, // * 1152921504606846976
-}
-
-// Is the leading prefix of b lexicographically less than s?
-func prefixIsLessThan(b []byte, s string) bool {
-	for i := 0; i < len(s); i++ {
-		if i >= len(b) {
-			return true
-		}
-		if b[i] != s[i] {
-			return b[i] < s[i]
-		}
-	}
-	return false
-}
-
-// Binary shift left (* 2) by k bits.  k <= maxShift to avoid overflow.
-func leftShift(a *decimal, k uint) {
-	delta := leftcheats[k].delta
-	if prefixIsLessThan(a.d[0:a.nd], leftcheats[k].cutoff) {
-		delta--
-	}
-
-	r := a.nd         // read index
-	w := a.nd + delta // write index
-
-	// Pick up a digit, put down a digit.
-	var n uint
-	for r--; r >= 0; r-- {
-		n += (uint(a.d[r]) - '0') << k
-		quo := n / 10
-		rem := n - 10*quo
-		w--
-		if w < len(a.d) {
-			a.d[w] = byte(rem + '0')
-		} else if rem != 0 {
-			a.trunc = true
-		}
-		n = quo
-	}
-
-	// Put down extra digits.
-	for n > 0 {
-		quo := n / 10
-		rem := n - 10*quo
-		w--
-		if w < len(a.d) {
-			a.d[w] = byte(rem + '0')
-		} else if rem != 0 {
-			a.trunc = true
-		}
-		n = quo
-	}
-
-	a.nd += delta
-	if a.nd >= len(a.d) {
-		a.nd = len(a.d)
-	}
-	a.dp += delta
-	trim(a)
-}
-
-// Binary shift left (k > 0) or right (k < 0).
-func (a *decimal) Shift(k int) {
-	switch {
-	case a.nd == 0:
-	// nothing to do: a == 0
-	case k > 0:
-		for k > maxShift {
-			leftShift(a, maxShift)
-			k -= maxShift
-		}
-		leftShift(a, uint(k))
-	case k < 0:
-		for k < -maxShift {
-			rightShift(a, maxShift)
-			k += maxShift
-		}
-		rightShift(a, uint(-k))
-	}
-}
-
-// If we chop a at nd digits, should we round up?
-func shouldRoundUp(a *decimal, nd int) bool {
-	if nd < 0 || nd >= a.nd {
-		return false
-	}
-	if a.d[nd] == '5' && nd+1 == a.nd {
-		// exactly halfway - round to even
-		// if we truncated, a little higher than what's recorded - always round up
-		if a.trunc {
-			return true
-		}
-		return nd > 0 && (a.d[nd-1]-'0')%2 != 0
-	}
-	// not halfway - digit tells all
-	return a.d[nd] >= '5'
-}
-
-// Round a to nd digits (or fewer).
-// If nd is zero, it means we're rounding
-// just to the left of the digits, as in
-// 0.09 -> 0.1.
-func (a *decimal) Round(nd int) {
-	if nd < 0 || nd >= a.nd {
-		return
-	}
-	if shouldRoundUp(a, nd) {
-		a.RoundUp(nd)
-	} else {
-		a.RoundDown(nd)
-	}
-}
-
-// Round a down to nd digits (or fewer).
-func (a *decimal) RoundDown(nd int) {
-	if nd < 0 || nd >= a.nd {
-		return
-	}
-	a.nd = nd
-	trim(a)
-}
-
-// Round a up to nd digits (or fewer).
-func (a *decimal) RoundUp(nd int) {
-	if nd < 0 || nd >= a.nd {
-		return
-	}
-
-	// round up
-	for i := nd - 1; i >= 0; i-- {
-		c := a.d[i]
-		if c < '9' {
-			// can stop after this digit
-			a.d[i]++
-			a.nd = i + 1
-			return
-		}
-	}
-
-	// Number is all 9s.
-	// Change to single 1 with adjusted decimal point.
-	a.d[0] = '1'
-	a.nd = 1
-	a.dp++
-}
-
-// Extract integer part, rounded appropriately.
-// No guarantees about overflow.
-func (a *decimal) RoundedInteger() uint64 {
-	if a.dp > 20 {
-		return 0xFFFFFFFFFFFFFFFF
-	}
-	var i int
-	n := uint64(0)
-	for i = 0; i < a.dp && i < a.nd; i++ {
-		n = n*10 + uint64(a.d[i]-'0')
-	}
-	for ; i < a.dp; i++ {
-		n *= 10
-	}
-	if shouldRoundUp(a, a.dp) {
-		n++
-	}
-	return n
-}
diff --git a/vendor/github.com/CloudyKit/fastprinter/extfloat.go b/vendor/github.com/CloudyKit/fastprinter/extfloat.go
deleted file mode 100644
index b9cb2e3..0000000
--- a/vendor/github.com/CloudyKit/fastprinter/extfloat.go
+++ /dev/null
@@ -1,668 +0,0 @@
-// Copyright 2011 The Go Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style
-// license that can be found in the LICENSE file.
-
-package fastprinter
-
-// An extFloat represents an extended floating-point number, with more
-// precision than a float64. It does not try to save bits: the
-// number represented by the structure is mant*(2^exp), with a negative
-// sign if neg is true.
-type extFloat struct {
-	mant uint64
-	exp  int
-	neg  bool
-}
-
-// Powers of ten taken from double-conversion library.
-// http://code.google.com/p/double-conversion/
-const (
-	firstPowerOfTen = -348
-	stepPowerOfTen  = 8
-)
-
-var smallPowersOfTen = [...]extFloat{
-	{1 << 63, -63, false},        // 1
-	{0xa << 60, -60, false},      // 1e1
-	{0x64 << 57, -57, false},     // 1e2
-	{0x3e8 << 54, -54, false},    // 1e3
-	{0x2710 << 50, -50, false},   // 1e4
-	{0x186a0 << 47, -47, false},  // 1e5
-	{0xf4240 << 44, -44, false},  // 1e6
-	{0x989680 << 40, -40, false}, // 1e7
-}
-
-var powersOfTen = [...]extFloat{
-	{0xfa8fd5a0081c0288, -1220, false}, // 10^-348
-	{0xbaaee17fa23ebf76, -1193, false}, // 10^-340
-	{0x8b16fb203055ac76, -1166, false}, // 10^-332
-	{0xcf42894a5dce35ea, -1140, false}, // 10^-324
-	{0x9a6bb0aa55653b2d, -1113, false}, // 10^-316
-	{0xe61acf033d1a45df, -1087, false}, // 10^-308
-	{0xab70fe17c79ac6ca, -1060, false}, // 10^-300
-	{0xff77b1fcbebcdc4f, -1034, false}, // 10^-292
-	{0xbe5691ef416bd60c, -1007, false}, // 10^-284
-	{0x8dd01fad907ffc3c, -980, false},  // 10^-276
-	{0xd3515c2831559a83, -954, false},  // 10^-268
-	{0x9d71ac8fada6c9b5, -927, false},  // 10^-260
-	{0xea9c227723ee8bcb, -901, false},  // 10^-252
-	{0xaecc49914078536d, -874, false},  // 10^-244
-	{0x823c12795db6ce57, -847, false},  // 10^-236
-	{0xc21094364dfb5637, -821, false},  // 10^-228
-	{0x9096ea6f3848984f, -794, false},  // 10^-220
-	{0xd77485cb25823ac7, -768, false},  // 10^-212
-	{0xa086cfcd97bf97f4, -741, false},  // 10^-204
-	{0xef340a98172aace5, -715, false},  // 10^-196
-	{0xb23867fb2a35b28e, -688, false},  // 10^-188
-	{0x84c8d4dfd2c63f3b, -661, false},  // 10^-180
-	{0xc5dd44271ad3cdba, -635, false},  // 10^-172
-	{0x936b9fcebb25c996, -608, false},  // 10^-164
-	{0xdbac6c247d62a584, -582, false},  // 10^-156
-	{0xa3ab66580d5fdaf6, -555, false},  // 10^-148
-	{0xf3e2f893dec3f126, -529, false},  // 10^-140
-	{0xb5b5ada8aaff80b8, -502, false},  // 10^-132
-	{0x87625f056c7c4a8b, -475, false},  // 10^-124
-	{0xc9bcff6034c13053, -449, false},  // 10^-116
-	{0x964e858c91ba2655, -422, false},  // 10^-108
-	{0xdff9772470297ebd, -396, false},  // 10^-100
-	{0xa6dfbd9fb8e5b88f, -369, false},  // 10^-92
-	{0xf8a95fcf88747d94, -343, false},  // 10^-84
-	{0xb94470938fa89bcf, -316, false},  // 10^-76
-	{0x8a08f0f8bf0f156b, -289, false},  // 10^-68
-	{0xcdb02555653131b6, -263, false},  // 10^-60
-	{0x993fe2c6d07b7fac, -236, false},  // 10^-52
-	{0xe45c10c42a2b3b06, -210, false},  // 10^-44
-	{0xaa242499697392d3, -183, false},  // 10^-36
-	{0xfd87b5f28300ca0e, -157, false},  // 10^-28
-	{0xbce5086492111aeb, -130, false},  // 10^-20
-	{0x8cbccc096f5088cc, -103, false},  // 10^-12
-	{0xd1b71758e219652c, -77, false},   // 10^-4
-	{0x9c40000000000000, -50, false},   // 10^4
-	{0xe8d4a51000000000, -24, false},   // 10^12
-	{0xad78ebc5ac620000, 3, false},     // 10^20
-	{0x813f3978f8940984, 30, false},    // 10^28
-	{0xc097ce7bc90715b3, 56, false},    // 10^36
-	{0x8f7e32ce7bea5c70, 83, false},    // 10^44
-	{0xd5d238a4abe98068, 109, false},   // 10^52
-	{0x9f4f2726179a2245, 136, false},   // 10^60
-	{0xed63a231d4c4fb27, 162, false},   // 10^68
-	{0xb0de65388cc8ada8, 189, false},   // 10^76
-	{0x83c7088e1aab65db, 216, false},   // 10^84
-	{0xc45d1df942711d9a, 242, false},   // 10^92
-	{0x924d692ca61be758, 269, false},   // 10^100
-	{0xda01ee641a708dea, 295, false},   // 10^108
-	{0xa26da3999aef774a, 322, false},   // 10^116
-	{0xf209787bb47d6b85, 348, false},   // 10^124
-	{0xb454e4a179dd1877, 375, false},   // 10^132
-	{0x865b86925b9bc5c2, 402, false},   // 10^140
-	{0xc83553c5c8965d3d, 428, false},   // 10^148
-	{0x952ab45cfa97a0b3, 455, false},   // 10^156
-	{0xde469fbd99a05fe3, 481, false},   // 10^164
-	{0xa59bc234db398c25, 508, false},   // 10^172
-	{0xf6c69a72a3989f5c, 534, false},   // 10^180
-	{0xb7dcbf5354e9bece, 561, false},   // 10^188
-	{0x88fcf317f22241e2, 588, false},   // 10^196
-	{0xcc20ce9bd35c78a5, 614, false},   // 10^204
-	{0x98165af37b2153df, 641, false},   // 10^212
-	{0xe2a0b5dc971f303a, 667, false},   // 10^220
-	{0xa8d9d1535ce3b396, 694, false},   // 10^228
-	{0xfb9b7cd9a4a7443c, 720, false},   // 10^236
-	{0xbb764c4ca7a44410, 747, false},   // 10^244
-	{0x8bab8eefb6409c1a, 774, false},   // 10^252
-	{0xd01fef10a657842c, 800, false},   // 10^260
-	{0x9b10a4e5e9913129, 827, false},   // 10^268
-	{0xe7109bfba19c0c9d, 853, false},   // 10^276
-	{0xac2820d9623bf429, 880, false},   // 10^284
-	{0x80444b5e7aa7cf85, 907, false},   // 10^292
-	{0xbf21e44003acdd2d, 933, false},   // 10^300
-	{0x8e679c2f5e44ff8f, 960, false},   // 10^308
-	{0xd433179d9c8cb841, 986, false},   // 10^316
-	{0x9e19db92b4e31ba9, 1013, false},  // 10^324
-	{0xeb96bf6ebadf77d9, 1039, false},  // 10^332
-	{0xaf87023b9bf0ee6b, 1066, false},  // 10^340
-}
-
-// floatBits returns the bits of the float64 that best approximates
-// the extFloat passed as receiver. Overflow is set to true if
-// the resulting float64 is ±Inf.
-func (f *extFloat) floatBits(flt *floatInfo) (bits uint64, overflow bool) {
-	f.Normalize()
-
-	exp := f.exp + 63
-
-	// Exponent too small.
-	if exp < flt.bias+1 {
-		n := flt.bias + 1 - exp
-		f.mant >>= uint(n)
-		exp += n
-	}
-
-	// Extract 1+flt.mantbits bits from the 64-bit mantissa.
-	mant := f.mant >> (63 - flt.mantbits)
-	if f.mant&(1<<(62-flt.mantbits)) != 0 {
-		// Round up.
-		mant += 1
-	}
-
-	// Rounding might have added a bit; shift down.
-	if mant == 2<<flt.mantbits {
-		mant >>= 1
-		exp++
-	}
-
-	// Infinities.
-	if exp-flt.bias >= 1<<flt.expbits-1 {
-		// ±Inf
-		mant = 0
-		exp = 1<<flt.expbits - 1 + flt.bias
-		overflow = true
-	} else if mant&(1<<flt.mantbits) == 0 {
-		// Denormalized?
-		exp = flt.bias
-	}
-	// Assemble bits.
-	bits = mant & (uint64(1)<<flt.mantbits - 1)
-	bits |= uint64((exp-flt.bias)&(1<<flt.expbits-1)) << flt.mantbits
-	if f.neg {
-		bits |= 1 << (flt.mantbits + flt.expbits)
-	}
-	return
-}
-
-// AssignComputeBounds sets f to the floating point value
-// defined by mant, exp and precision given by flt. It returns
-// lower, upper such that any number in the closed interval
-// [lower, upper] is converted back to the same floating point number.
-func (f *extFloat) AssignComputeBounds(mant uint64, exp int, neg bool, flt *floatInfo) (lower, upper extFloat) {
-	f.mant = mant
-	f.exp = exp - int(flt.mantbits)
-	f.neg = neg
-	if f.exp <= 0 && mant == (mant>>uint(-f.exp))<<uint(-f.exp) {
-		// An exact integer
-		f.mant >>= uint(-f.exp)
-		f.exp = 0
-		return *f, *f
-	}
-	expBiased := exp - flt.bias
-
-	upper = extFloat{mant: 2*f.mant + 1, exp: f.exp - 1, neg: f.neg}
-	if mant != 1<<flt.mantbits || expBiased == 1 {
-		lower = extFloat{mant: 2*f.mant - 1, exp: f.exp - 1, neg: f.neg}
-	} else {
-		lower = extFloat{mant: 4*f.mant - 1, exp: f.exp - 2, neg: f.neg}
-	}
-	return
-}
-
-// Normalize normalizes f so that the highest bit of the mantissa is
-// set, and returns the number by which the mantissa was left-shifted.
-func (f *extFloat) Normalize() (shift uint) {
-	mant, exp := f.mant, f.exp
-	if mant == 0 {
-		return 0
-	}
-	if mant>>(64-32) == 0 {
-		mant <<= 32
-		exp -= 32
-	}
-	if mant>>(64-16) == 0 {
-		mant <<= 16
-		exp -= 16
-	}
-	if mant>>(64-8) == 0 {
-		mant <<= 8
-		exp -= 8
-	}
-	if mant>>(64-4) == 0 {
-		mant <<= 4
-		exp -= 4
-	}
-	if mant>>(64-2) == 0 {
-		mant <<= 2
-		exp -= 2
-	}
-	if mant>>(64-1) == 0 {
-		mant <<= 1
-		exp -= 1
-	}
-	shift = uint(f.exp - exp)
-	f.mant, f.exp = mant, exp
-	return
-}
-
-// Multiply sets f to the product f*g: the result is correctly rounded,
-// but not normalized.
-func (f *extFloat) Multiply(g extFloat) {
-	fhi, flo := f.mant>>32, uint64(uint32(f.mant))
-	ghi, glo := g.mant>>32, uint64(uint32(g.mant))
-
-	// Cross products.
-	cross1 := fhi * glo
-	cross2 := flo * ghi
-
-	// f.mant*g.mant is fhi*ghi << 64 + (cross1+cross2) << 32 + flo*glo
-	f.mant = fhi*ghi + (cross1 >> 32) + (cross2 >> 32)
-	rem := uint64(uint32(cross1)) + uint64(uint32(cross2)) + ((flo * glo) >> 32)
-	// Round up.
-	rem += (1 << 31)
-
-	f.mant += (rem >> 32)
-	f.exp = f.exp + g.exp + 64
-}
-
-var uint64pow10 = [...]uint64{
-	1, 1e1, 1e2, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9,
-	1e10, 1e11, 1e12, 1e13, 1e14, 1e15, 1e16, 1e17, 1e18, 1e19,
-}
-
-// AssignDecimal sets f to an approximate value mantissa*10^exp. It
-// reports whether the value represented by f is guaranteed to be the
-// best approximation of d after being rounded to a float64 or
-// float32 depending on flt.
-func (f *extFloat) AssignDecimal(mantissa uint64, exp10 int, neg bool, trunc bool, flt *floatInfo) (ok bool) {
-	const uint64digits = 19
-	const errorscale = 8
-	errors := 0 // An upper bound for error, computed in errorscale*ulp.
-	if trunc {
-		// the decimal number was truncated.
-		errors += errorscale / 2
-	}
-
-	f.mant = mantissa
-	f.exp = 0
-	f.neg = neg
-
-	// Multiply by powers of ten.
-	i := (exp10 - firstPowerOfTen) / stepPowerOfTen
-	if exp10 < firstPowerOfTen || i >= len(powersOfTen) {
-		return false
-	}
-	adjExp := (exp10 - firstPowerOfTen) % stepPowerOfTen
-
-	// We multiply by exp%step
-	if adjExp < uint64digits && mantissa < uint64pow10[uint64digits-adjExp] {
-		// We can multiply the mantissa exactly.
-		f.mant *= uint64pow10[adjExp]
-		f.Normalize()
-	} else {
-		f.Normalize()
-		f.Multiply(smallPowersOfTen[adjExp])
-		errors += errorscale / 2
-	}
-
-	// We multiply by 10 to the exp - exp%step.
-	f.Multiply(powersOfTen[i])
-	if errors > 0 {
-		errors += 1
-	}
-	errors += errorscale / 2
-
-	// Normalize
-	shift := f.Normalize()
-	errors <<= shift
-
-	// Now f is a good approximation of the decimal.
-	// Check whether the error is too large: that is, if the mantissa
-	// is perturbated by the error, the resulting float64 will change.
-	// The 64 bits mantissa is 1 + 52 bits for float64 + 11 extra bits.
-	//
-	// In many cases the approximation will be good enough.
-	denormalExp := flt.bias - 63
-	var extrabits uint
-	if f.exp <= denormalExp {
-		// f.mant * 2^f.exp is smaller than 2^(flt.bias+1).
-		extrabits = uint(63 - flt.mantbits + 1 + uint(denormalExp-f.exp))
-	} else {
-		extrabits = uint(63 - flt.mantbits)
-	}
-
-	halfway := uint64(1) << (extrabits - 1)
-	mant_extra := f.mant & (1<<extrabits - 1)
-
-	// Do a signed comparison here! If the error estimate could make
-	// the mantissa round differently for the conversion to double,
-	// then we can't give a definite answer.
-	if int64(halfway)-int64(errors) < int64(mant_extra) &&
-		int64(mant_extra) < int64(halfway)+int64(errors) {
-		return false
-	}
-	return true
-}
-
-// Frexp10 is an analogue of math.Frexp for decimal powers. It scales
-// f by an approximate power of ten 10^-exp, and returns exp10, so
-// that f*10^exp10 has the same value as the old f, up to an ulp,
-// as well as the index of 10^-exp in the powersOfTen table.
-func (f *extFloat) frexp10() (exp10, index int) {
-	// The constants expMin and expMax constrain the final value of the
-	// binary exponent of f. We want a small integral part in the result
-	// because finding digits of an integer requires divisions, whereas
-	// digits of the fractional part can be found by repeatedly multiplying
-	// by 10.
-	const expMin = -60
-	const expMax = -32
-	// Find power of ten such that x * 10^n has a binary exponent
-	// between expMin and expMax.
-	approxExp10 := ((expMin+expMax)/2 - f.exp) * 28 / 93 // log(10)/log(2) is close to 93/28.
-	i := (approxExp10 - firstPowerOfTen) / stepPowerOfTen
-Loop:
-	for {
-		exp := f.exp + powersOfTen[i].exp + 64
-		switch {
-		case exp < expMin:
-			i++
-		case exp > expMax:
-			i--
-		default:
-			break Loop
-		}
-	}
-	// Apply the desired decimal shift on f. It will have exponent
-	// in the desired range. This is multiplication by 10^-exp10.
-	f.Multiply(powersOfTen[i])
-
-	return -(firstPowerOfTen + i*stepPowerOfTen), i
-}
-
-// frexp10Many applies a common shift by a power of ten to a, b, c.
-func frexp10Many(a, b, c *extFloat) (exp10 int) {
-	exp10, i := c.frexp10()
-	a.Multiply(powersOfTen[i])
-	b.Multiply(powersOfTen[i])
-	return
-}
-
-// FixedDecimal stores in d the first n significant digits
-// of the decimal representation of f. It returns false
-// if it cannot be sure of the answer.
-func (f *extFloat) FixedDecimal(d *decimalSlice, n int) bool {
-	if f.mant == 0 {
-		d.nd = 0
-		d.dp = 0
-		d.neg = f.neg
-		return true
-	}
-	if n == 0 {
-		panic("strconv: internal error: extFloat.FixedDecimal called with n == 0")
-	}
-	// Multiply by an appropriate power of ten to have a reasonable
-	// number to process.
-	f.Normalize()
-	exp10, _ := f.frexp10()
-
-	shift := uint(-f.exp)
-	integer := uint32(f.mant >> shift)
-	fraction := f.mant - (uint64(integer) << shift)
-	ε := uint64(1) // ε is the uncertainty we have on the mantissa of f.
-
-	// Write exactly n digits to d.
-	needed := n        // how many digits are left to write.
-	integerDigits := 0 // the number of decimal digits of integer.
-	pow10 := uint64(1) // the power of ten by which f was scaled.
-	for i, pow := 0, uint64(1); i < 20; i++ {
-		if pow > uint64(integer) {
-			integerDigits = i
-			break
-		}
-		pow *= 10
-	}
-	rest := integer
-	if integerDigits > needed {
-		// the integral part is already large, trim the last digits.
-		pow10 = uint64pow10[integerDigits-needed]
-		integer /= uint32(pow10)
-		rest -= integer * uint32(pow10)
-	} else {
-		rest = 0
-	}
-
-	// Write the digits of integer: the digits of rest are omitted.
-	var buf [32]byte
-	pos := len(buf)
-	for v := integer; v > 0; {
-		v1 := v / 10
-		v -= 10 * v1
-		pos--
-		buf[pos] = byte(v + '0')
-		v = v1
-	}
-	for i := pos; i < len(buf); i++ {
-		d.d[i-pos] = buf[i]
-	}
-	nd := len(buf) - pos
-	d.nd = nd
-	d.dp = integerDigits + exp10
-	needed -= nd
-
-	if needed > 0 {
-		if rest != 0 || pow10 != 1 {
-			panic("strconv: internal error, rest != 0 but needed > 0")
-		}
-		// Emit digits for the fractional part. Each time, 10*fraction
-		// fits in a uint64 without overflow.
-		for needed > 0 {
-			fraction *= 10
-			ε *= 10 // the uncertainty scales as we multiply by ten.
-			if 2*ε > 1<<shift {
-				// the error is so large it could modify which digit to write, abort.
-				return false
-			}
-			digit := fraction >> shift
-			d.d[nd] = byte(digit + '0')
-			fraction -= digit << shift
-			nd++
-			needed--
-		}
-		d.nd = nd
-	}
-
-	// We have written a truncation of f (a numerator / 10^d.dp). The remaining part
-	// can be interpreted as a small number (< 1) to be added to the last digit of the
-	// numerator.
-	//
-	// If rest > 0, the amount is:
-	//    (rest<<shift | fraction) / (pow10 << shift)
-	//    fraction being known with a ±ε uncertainty.
-	//    The fact that n > 0 guarantees that pow10 << shift does not overflow a uint64.
-	//
-	// If rest = 0, pow10 == 1 and the amount is
-	//    fraction / (1 << shift)
-	//    fraction being known with a ±ε uncertainty.
-	//
-	// We pass this information to the rounding routine for adjustment.
-
-	ok := adjustLastDigitFixed(d, uint64(rest)<<shift|fraction, pow10, shift, ε)
-	if !ok {
-		return false
-	}
-	// Trim trailing zeros.
-	for i := d.nd - 1; i >= 0; i-- {
-		if d.d[i] != '0' {
-			d.nd = i + 1
-			break
-		}
-	}
-	return true
-}
-
-// adjustLastDigitFixed assumes d contains the representation of the integral part
-// of some number, whose fractional part is num / (den << shift). The numerator
-// num is only known up to an uncertainty of size ε, assumed to be less than
-// (den << shift)/2.
-//
-// It will increase the last digit by one to account for correct rounding, typically
-// when the fractional part is greater than 1/2, and will return false if ε is such
-// that no correct answer can be given.
-func adjustLastDigitFixed(d *decimalSlice, num, den uint64, shift uint, ε uint64) bool {
-	if num > den<<shift {
-		panic("strconv: num > den<<shift in adjustLastDigitFixed")
-	}
-	if 2*ε > den<<shift {
-		panic("strconv: ε > (den<<shift)/2")
-	}
-	if 2*(num+ε) < den<<shift {
-		return true
-	}
-	if 2*(num-ε) > den<<shift {
-		// increment d by 1.
-		i := d.nd - 1
-		for ; i >= 0; i-- {
-			if d.d[i] == '9' {
-				d.nd--
-			} else {
-				break
-			}
-		}
-		if i < 0 {
-			d.d[0] = '1'
-			d.nd = 1
-			d.dp++
-		} else {
-			d.d[i]++
-		}
-		return true
-	}
-	return false
-}
-
-// ShortestDecimal stores in d the shortest decimal representation of f
-// which belongs to the open interval (lower, upper), where f is supposed
-// to lie. It returns false whenever the result is unsure. The implementation
-// uses the Grisu3 algorithm.
-func (f *extFloat) ShortestDecimal(d *decimalSlice, lower, upper *extFloat) bool {
-	if f.mant == 0 {
-		d.nd = 0
-		d.dp = 0
-		d.neg = f.neg
-		return true
-	}
-	if f.exp == 0 && *lower == *f && *lower == *upper {
-		// an exact integer.
-		var buf [24]byte
-		n := len(buf) - 1
-		for v := f.mant; v > 0; {
-			v1 := v / 10
-			v -= 10 * v1
-			buf[n] = byte(v + '0')
-			n--
-			v = v1
-		}
-		nd := len(buf) - n - 1
-		for i := 0; i < nd; i++ {
-			d.d[i] = buf[n+1+i]
-		}
-		d.nd, d.dp = nd, nd
-		for d.nd > 0 && d.d[d.nd-1] == '0' {
-			d.nd--
-		}
-		if d.nd == 0 {
-			d.dp = 0
-		}
-		d.neg = f.neg
-		return true
-	}
-	upper.Normalize()
-	// Uniformize exponents.
-	if f.exp > upper.exp {
-		f.mant <<= uint(f.exp - upper.exp)
-		f.exp = upper.exp
-	}
-	if lower.exp > upper.exp {
-		lower.mant <<= uint(lower.exp - upper.exp)
-		lower.exp = upper.exp
-	}
-
-	exp10 := frexp10Many(lower, f, upper)
-	// Take a safety margin due to rounding in frexp10Many, but we lose precision.
-	upper.mant++
-	lower.mant--
-
-	// The shortest representation of f is either rounded up or down, but
-	// in any case, it is a truncation of upper.
-	shift := uint(-upper.exp)
-	integer := uint32(upper.mant >> shift)
-	fraction := upper.mant - (uint64(integer) << shift)
-
-	// How far we can go down from upper until the result is wrong.
-	allowance := upper.mant - lower.mant
-	// How far we should go to get a very precise result.
-	targetDiff := upper.mant - f.mant
-
-	// Count integral digits: there are at most 10.
-	var integerDigits int
-	for i, pow := 0, uint64(1); i < 20; i++ {
-		if pow > uint64(integer) {
-			integerDigits = i
-			break
-		}
-		pow *= 10
-	}
-	for i := 0; i < integerDigits; i++ {
-		pow := uint64pow10[integerDigits-i-1]
-		digit := integer / uint32(pow)
-		d.d[i] = byte(digit + '0')
-		integer -= digit * uint32(pow)
-		// evaluate whether we should stop.
-		if currentDiff := uint64(integer)<<shift + fraction; currentDiff < allowance {
-			d.nd = i + 1
-			d.dp = integerDigits + exp10
-			d.neg = f.neg
-			// Sometimes allowance is so large the last digit might need to be
-			// decremented to get closer to f.
-			return adjustLastDigit(d, currentDiff, targetDiff, allowance, pow<<shift, 2)
-		}
-	}
-	d.nd = integerDigits
-	d.dp = d.nd + exp10
-	d.neg = f.neg
-
-	// Compute digits of the fractional part. At each step fraction does not
-	// overflow. The choice of minExp implies that fraction is less than 2^60.
-	var digit int
-	multiplier := uint64(1)
-	for {
-		fraction *= 10
-		multiplier *= 10
-		digit = int(fraction >> shift)
-		d.d[d.nd] = byte(digit + '0')
-		d.nd++
-		fraction -= uint64(digit) << shift
-		if fraction < allowance*multiplier {
-			// We are in the admissible range. Note that if allowance is about to
-			// overflow, that is, allowance > 2^64/10, the condition is automatically
-			// true due to the limited range of fraction.
-			return adjustLastDigit(d,
-				fraction, targetDiff*multiplier, allowance*multiplier,
-				1<<shift, multiplier*2)
-		}
-	}
-}
-
-// adjustLastDigit modifies d = x-currentDiff*ε, to get closest to
-// d = x-targetDiff*ε, without becoming smaller than x-maxDiff*ε.
-// It assumes that a decimal digit is worth ulpDecimal*ε, and that
-// all data is known with a error estimate of ulpBinary*ε.
-func adjustLastDigit(d *decimalSlice, currentDiff, targetDiff, maxDiff, ulpDecimal, ulpBinary uint64) bool {
-	if ulpDecimal < 2*ulpBinary {
-		// Approximation is too wide.
-		return false
-	}
-	for currentDiff+ulpDecimal/2+ulpBinary < targetDiff {
-		d.d[d.nd-1]--
-		currentDiff += ulpDecimal
-	}
-	if currentDiff+ulpDecimal <= targetDiff+ulpDecimal/2+ulpBinary {
-		// we have two choices, and don't know what to do.
-		return false
-	}
-	if currentDiff < ulpBinary || currentDiff > maxDiff-ulpBinary {
-		// we went too far
-		return false
-	}
-	if d.nd == 1 && d.d[0] == '0' {
-		// the number has actually reached zero.
-		d.nd = 0
-		d.dp = 0
-	}
-	return true
-}
diff --git a/vendor/github.com/CloudyKit/fastprinter/float.go b/vendor/github.com/CloudyKit/fastprinter/float.go
deleted file mode 100644
index c9b18ae..0000000
--- a/vendor/github.com/CloudyKit/fastprinter/float.go
+++ /dev/null
@@ -1,269 +0,0 @@
-// Copyright 2016 José Santos <henrique_1609@me.com>
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-package fastprinter
-
-import (
-	"io"
-	"math"
-)
-
-type floatInfo struct {
-	mantbits uint
-	expbits  uint
-	bias     int
-}
-
-var (
-	float64info      = floatInfo{52, 11, -1023}
-	floatNaN         = []byte("Nan")
-	floatNinf        = []byte("-Inf")
-	floatPinf        = []byte("+Inf")
-	pool_floatBuffer = newByteSliceBufferPool(800)
-)
-
-func PrintFloat(w io.Writer, f float64) (int, error) {
-	return PrintFloatPrecision(w, f, -1)
-}
-
-func PrintFloatPrecision(dst io.Writer, val float64, prec int) (int, error) {
-	var bits uint64
-	var flt *floatInfo
-
-	bits = math.Float64bits(val)
-	flt = &float64info
-
-	neg := bits>>(flt.expbits+flt.mantbits) != 0
-	exp := int(bits>>flt.mantbits) & (1<<flt.expbits - 1)
-	mant := bits & (uint64(1)<<flt.mantbits - 1)
-
-	switch exp {
-	case 1<<flt.expbits - 1:
-		switch {
-		case mant != 0:
-			return dst.Write(floatNaN)
-		case neg:
-			return dst.Write(floatNinf)
-		default:
-			return dst.Write(floatPinf)
-		}
-	case 0:
-		// denormalized
-		exp++
-	default:
-		// add implicit top bit
-		mant |= uint64(1) << flt.mantbits
-	}
-
-	exp += flt.bias
-	var digs decimalSlice
-	ok := false
-
-	// Negative precision means "only as much as needed to be exact."
-	shortest := prec < 0
-	if shortest {
-		// Try Grisu3 algorithm.
-		f := new(extFloat)
-		lower, upper := f.AssignComputeBounds(mant, exp, neg, flt)
-		var buf [32]byte
-		digs.d = buf[:]
-		ok = f.ShortestDecimal(&digs, &lower, &upper)
-		if !ok {
-			return bigFtoa(dst, prec, neg, mant, exp, flt)
-		}
-		// Precision for shortest representation mode.
-		prec = max(digs.nd-digs.dp, 0)
-	}
-	if !ok {
-		return bigFtoa(dst, prec, neg, mant, exp, flt)
-	}
-	return fmtF(dst, neg, digs, prec)
-}
-
-// bigFtoa uses multiprecision computations to format a float.
-func bigFtoa(dst io.Writer, prec int, neg bool, mant uint64, exp int, flt *floatInfo) (int, error) {
-	d := new(decimal)
-	d.Assign(mant)
-	d.Shift(exp - int(flt.mantbits))
-	var digs decimalSlice
-	shortest := prec < 0
-	if shortest {
-		roundShortest(d, mant, exp, flt)
-		digs = decimalSlice{d: d.d[:], nd: d.nd, dp: d.dp}
-		prec = max(digs.nd-digs.dp, 0)
-	} else {
-		d.Round(d.dp + prec)
-		digs = decimalSlice{d: d.d[:], nd: d.nd, dp: d.dp}
-	}
-	return fmtF(dst, neg, digs, prec)
-}
-
-// roundShortest rounds d (= mant * 2^exp) to the shortest number of digits
-// that will let the original floating point value be precisely reconstructed.
-func roundShortest(d *decimal, mant uint64, exp int, flt *floatInfo) {
-	// If mantissa is zero, the number is zero; stop now.
-	if mant == 0 {
-		d.nd = 0
-		return
-	}
-
-	// Compute upper and lower such that any decimal number
-	// between upper and lower (possibly inclusive)
-	// will round to the original floating point number.
-
-	// We may see at once that the number is already shortest.
-	//
-	// Suppose d is not denormal, so that 2^exp <= d < 10^dp.
-	// The closest shorter number is at least 10^(dp-nd) away.
-	// The lower/upper bounds computed below are at distance
-	// at most 2^(exp-mantbits).
-	//
-	// So the number is already shortest if 10^(dp-nd) > 2^(exp-mantbits),
-	// or equivalently log2(10)*(dp-nd) > exp-mantbits.
-	// It is true if 332/100*(dp-nd) >= exp-mantbits (log2(10) > 3.32).
-	minexp := flt.bias + 1 // minimum possible exponent
-	if exp > minexp && 332*(d.dp-d.nd) >= 100*(exp-int(flt.mantbits)) {
-		// The number is already shortest.
-		return
-	}
-
-	// d = mant << (exp - mantbits)
-	// Next highest floating point number is mant+1 << exp-mantbits.
-	// Our upper bound is halfway between, mant*2+1 << exp-mantbits-1.
-	upper := new(decimal)
-	upper.Assign(mant*2 + 1)
-	upper.Shift(exp - int(flt.mantbits) - 1)
-
-	// d = mant << (exp - mantbits)
-	// Next lowest floating point number is mant-1 << exp-mantbits,
-	// unless mant-1 drops the significant bit and exp is not the minimum exp,
-	// in which case the next lowest is mant*2-1 << exp-mantbits-1.
-	// Either way, call it mantlo << explo-mantbits.
-	// Our lower bound is halfway between, mantlo*2+1 << explo-mantbits-1.
-	var mantlo uint64
-	var explo int
-	if mant > 1<<flt.mantbits || exp == minexp {
-		mantlo = mant - 1
-		explo = exp
-	} else {
-		mantlo = mant*2 - 1
-		explo = exp - 1
-	}
-	lower := new(decimal)
-	lower.Assign(mantlo*2 + 1)
-	lower.Shift(explo - int(flt.mantbits) - 1)
-
-	// The upper and lower bounds are possible outputs only if
-	// the original mantissa is even, so that IEEE round-to-even
-	// would round to the original mantissa and not the neighbors.
-	inclusive := mant%2 == 0
-
-	// Now we can figure out the minimum number of digits required.
-	// Walk along until d has distinguished itself from upper and lower.
-	for i := 0; i < d.nd; i++ {
-		l := byte('0') // lower digit
-		if i < lower.nd {
-			l = lower.d[i]
-		}
-		m := d.d[i]    // middle digit
-		u := byte('0') // upper digit
-		if i < upper.nd {
-			u = upper.d[i]
-		}
-
-		// Okay to round down (truncate) if lower has a different digit
-		// or if lower is inclusive and is exactly the result of rounding
-		// down (i.e., and we have reached the final digit of lower).
-		okdown := l != m || inclusive && i+1 == lower.nd
-
-		// Okay to round up if upper has a different digit and either upper
-		// is inclusive or upper is bigger than the result of rounding up.
-		okup := m != u && (inclusive || m+1 < u || i+1 < upper.nd)
-
-		// If it's okay to do either, then round to the nearest one.
-		// If it's okay to do only one, do it.
-		switch {
-		case okdown && okup:
-			d.Round(i + 1)
-			return
-		case okdown:
-			d.RoundDown(i + 1)
-			return
-		case okup:
-			d.RoundUp(i + 1)
-			return
-		}
-	}
-}
-
-type decimalSlice struct {
-	d      []byte
-	nd, dp int
-	neg    bool
-}
-
-// %f: -ddddddd.ddddd
-func fmtF(dst io.Writer, neg bool, d decimalSlice, prec int) (n int, err error) {
-	a := pool_floatBuffer.Get().(*byteSliceBuffer)
-	i := 0
-
-	// sign
-	if neg {
-		a.bytes[i] = '-'
-		i++
-	}
-	// integer, padded with zeros as needed.
-	if d.dp > 0 {
-		m := min(d.nd, d.dp)
-		copy(a.bytes[i:], d.d[:m])
-		i += m
-		for ; m < d.dp; m++ {
-			a.bytes[i] = '0'
-			i++
-		}
-	} else {
-		a.bytes[i] = '0'
-		i++
-	}
-
-	// fraction
-	if prec > 0 {
-		a.bytes[i] = '.'
-		i++
-		for j := 0; j < prec; j++ {
-			ch := byte('0')
-			if j := d.dp + j; 0 <= j && j < d.nd {
-				ch = d.d[j]
-			}
-			a.bytes[i] = ch
-			i++
-		}
-	}
-	n, err = dst.Write(a.bytes[0:i])
-	pool_floatBuffer.Put(a)
-	return
-}
-
-func min(a, b int) int {
-	if a < b {
-		return a
-	}
-	return b
-}
-
-func max(a, b int) int {
-	if a > b {
-		return a
-	}
-	return b
-}
diff --git a/vendor/github.com/CloudyKit/fastprinter/printers.go b/vendor/github.com/CloudyKit/fastprinter/printers.go
deleted file mode 100644
index 74d25a0..0000000
--- a/vendor/github.com/CloudyKit/fastprinter/printers.go
+++ /dev/null
@@ -1,194 +0,0 @@
-// Copyright 2016 José Santos <henrique_1609@me.com>
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-package fastprinter
-
-import (
-	"fmt"
-	"io"
-	"reflect"
-	"sync"
-)
-
-const (
-	stringBufferSize  = 4096
-	integerBufferSize = 20
-)
-
-var (
-	_trueBytes  = ([]byte)("true")
-	_falseBytes = ([]byte)("false")
-
-	pool_integerBuffer = newByteSliceBufferPool(integerBufferSize)
-	pool_stringBuffer  = newByteSliceBufferPool(stringBufferSize)
-
-	errorType       = reflect.TypeOf((*error)(nil)).Elem()
-	fmtStringerType = reflect.TypeOf((*fmt.Stringer)(nil)).Elem()
-)
-
-type byteSliceBuffer struct {
-	bytes []byte
-}
-
-func newByteSliceBufferPool(size int) sync.Pool {
-	return sync.Pool{
-		New: func() interface{} {
-			return &byteSliceBuffer{make([]byte, size, size)}
-		},
-	}
-}
-
-func Print(w io.Writer, i interface{}) (int, error) {
-	return PrintValue(w, reflect.ValueOf(i))
-}
-
-func PrintPtr(w io.Writer, i interface{}) (int, error) {
-	return PrintValue(w, reflect.ValueOf(i).Elem())
-}
-
-func PrintBool(w io.Writer, b bool) (int, error) {
-	if b {
-		return w.Write(_trueBytes)
-	}
-	return w.Write(_falseBytes)
-}
-
-func PrintString(ww io.Writer, st string) (c int, err error) {
-	if st == "" {
-		return 0, nil
-	}
-
-	numI := len(st) / stringBufferSize
-	nextBucket := 0
-	written := 0
-
-	a := pool_stringBuffer.Get().(*byteSliceBuffer)
-	for i := 0; i < numI; i++ {
-		copy(a.bytes[:], st[nextBucket:nextBucket+stringBufferSize])
-		nextBucket += stringBufferSize
-		written, err = ww.Write(a.bytes[:])
-		c += written
-		if err != nil {
-			return
-		}
-	}
-
-	smallBucket := len(st) % stringBufferSize
-	if smallBucket > 0 {
-		copy(a.bytes[:], st[nextBucket:])
-		written, err = ww.Write(a.bytes[:smallBucket])
-		c += written
-	}
-	pool_stringBuffer.Put(a)
-	return
-}
-
-func PrintUint(w io.Writer, i uint64) (int, error) {
-	return formatBits(w, i, false)
-}
-
-func PrintInt(w io.Writer, i int64) (int, error) {
-	return formatBits(w, uint64(i), i < 0)
-}
-
-// formatBits computes the string representation of u in the given base.
-// If neg is set, u is treated as negative int64 value.
-// Extracted from std package strconv
-func formatBits(dst io.Writer, u uint64, neg bool) (int, error) {
-
-	var a = pool_integerBuffer.Get().(*byteSliceBuffer)
-
-	i := integerBufferSize
-
-	if neg {
-		u = -u
-	}
-
-	// common case: use constants for / because
-	// the compiler can optimize it into a multiply+shift
-
-	if ^uintptr(0)>>32 == 0 {
-		for u > uint64(^uintptr(0)) {
-			q := u / 1e9
-			us := uintptr(u - q*1e9) // us % 1e9 fits into a uintptr
-			for j := 9; j > 0; j-- {
-				i--
-				qs := us / 10
-				a.bytes[i] = byte(us - qs*10 + '0')
-				us = qs
-			}
-			u = q
-		}
-	}
-
-	// u guaranteed to fit into a uintptr
-	us := uintptr(u)
-	for us >= 10 {
-		i--
-		q := us / 10
-		a.bytes[i] = byte(us - q*10 + '0')
-		us = q
-	}
-	// u < 10
-	i--
-	a.bytes[i] = byte(us + '0')
-
-	// add sign, if any
-	if neg {
-		i--
-		a.bytes[i] = '-'
-	}
-	counter, err := dst.Write(a.bytes[i:])
-	pool_integerBuffer.Put(a)
-	return counter, err
-}
-
-// PrintValue prints a reflect.Value
-func PrintValue(w io.Writer, v reflect.Value) (int, error) {
-	t := v.Type()
-	k := t.Kind()
-
-	if t.Implements(fmtStringerType) {
-		return PrintString(w, v.Interface().(fmt.Stringer).String())
-	}
-
-	if t.Implements(errorType) {
-		return PrintString(w, v.Interface().(error).Error())
-	}
-
-	if k == reflect.String {
-		return PrintString(w, v.String())
-	}
-
-	if k >= reflect.Int && k <= reflect.Int64 {
-		return PrintInt(w, v.Int())
-	}
-
-	if k >= reflect.Uint && k <= reflect.Uint64 {
-		return PrintUint(w, v.Uint())
-	}
-
-	if k == reflect.Float64 || k == reflect.Float32 {
-		return PrintFloat(w, v.Float())
-	}
-
-	if k == reflect.Bool {
-		return PrintBool(w, v.Bool())
-	}
-
-	if k == reflect.Slice && t.Elem().Kind() == reflect.Uint8 {
-		return w.Write(v.Bytes())
-	}
-
-	return fmt.Fprint(w, v.Interface())
-}
diff --git a/yield/yield.go b/yield/yield.go
index 390121f..22c9b78 100644
--- a/yield/yield.go
+++ b/yield/yield.go
@@ -14,7 +14,7 @@
 
 package yield
 
-import "github.com/CloudyKit/jet"
+import "github.com/CloudyKit/jet/v3"
 
 type yieldValue struct {
 	Name    string


Test patch:
diff --git a/jettest/test.go b/jettest/test.go
index bb35d95..a30f85f 100644
--- a/jettest/test.go
+++ b/jettest/test.go
@@ -20,7 +20,7 @@ import (
 	"strings"
 	"testing"
 
-	"github.com/CloudyKit/jet"
+	"github.com/CloudyKit/jet/v3"
 )
 
 // TestingSet holds a template set for running tests
diff --git a/loaders/httpfs/httpfs_test.go b/loaders/httpfs/httpfs_test.go
index b8ceeba..cc9126e 100644
--- a/loaders/httpfs/httpfs_test.go
+++ b/loaders/httpfs/httpfs_test.go
@@ -4,8 +4,8 @@ import (
 	"net/http"
 	"testing"
 
-	"github.com/CloudyKit/jet"
-	"github.com/CloudyKit/jet/jettest"
+	"github.com/CloudyKit/jet/v3"
+	"github.com/CloudyKit/jet/v3/jettest"
 )
 
 func TestNilHTTPFileSystem(t *testing.T) {
diff --git a/loaders/multi/multi_test.go b/loaders/multi/multi_test.go
index 2fd20b0..cd1cbd4 100644
--- a/loaders/multi/multi_test.go
+++ b/loaders/multi/multi_test.go
@@ -4,9 +4,9 @@ import (
 	"net/http"
 	"testing"
 
-	"github.com/CloudyKit/jet"
-	"github.com/CloudyKit/jet/jettest"
-	"github.com/CloudyKit/jet/loaders/httpfs"
+	"github.com/CloudyKit/jet/v3"
+	"github.com/CloudyKit/jet/v3/jettest"
+	"github.com/CloudyKit/jet/v3/loaders/httpfs"
 )
 
 func TestZeroLoaders(t *testing.T) {
diff --git a/utils/visitor_test.go b/utils/visitor_test.go
index d4407da..c9aa186 100644
--- a/utils/visitor_test.go
+++ b/utils/visitor_test.go
@@ -4,7 +4,7 @@ import (
 	"reflect"
 	"testing"
 
-	"github.com/CloudyKit/jet"
+	"github.com/CloudyKit/jet/v3"
 )
 
 var Set = jet.NewHTMLSet()
diff --git a/vendor/github.com/CloudyKit/fastprinter/printer_test.go b/vendor/github.com/CloudyKit/fastprinter/printer_test.go
deleted file mode 100644
index d2e0c12..0000000
--- a/vendor/github.com/CloudyKit/fastprinter/printer_test.go
+++ /dev/null
@@ -1,190 +0,0 @@
-// Copyright 2016 José Santos <henrique_1609@me.com>
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-package fastprinter
-
-import (
-	"fmt"
-	"io"
-	"math"
-	"reflect"
-	"strings"
-	"testing"
-)
-
-type devNull struct{}
-
-func (*devNull) Write(_ []byte) (int, error) {
-	return 0, nil
-}
-
-var ww io.Writer = (*devNull)(nil)
-
-type testWriter struct {
-	main  [stringBufferSize * 64]byte
-	bytes []byte
-}
-
-func newTestWriter() *testWriter {
-	ww := new(testWriter)
-	ww.reset()
-	return ww
-}
-
-func (w *testWriter) Write(b []byte) (n int, err error) {
-	w.bytes = append(w.bytes, b...)
-	n = len(b)
-	return
-}
-
-func (w *testWriter) reset() {
-	w.bytes = w.main[:0]
-}
-
-func (w *testWriter) Assert(m string) {
-	if string(w.bytes) != m {
-		panic(fmt.Errorf("expected value is %s got %s", m, string(w.bytes)))
-	}
-	w.reset()
-}
-
-func (w *testWriter) String() string {
-	defer w.reset()
-	return string(w.bytes)
-}
-
-var w = newTestWriter()
-
-func TestPrintBool(t *testing.T) {
-
-	allocsPerRun := testing.AllocsPerRun(3000, func() {
-		PrintBool(w, true)
-		w.Assert("true")
-		PrintBool(w, false)
-		w.Assert("false")
-	})
-
-	if allocsPerRun > 0 {
-		t.Errorf("PrintBool is allocating %f", allocsPerRun)
-	}
-}
-
-var bigString = strings.Repeat("Hello World!", stringBufferSize)
-
-func TestPrintString(t *testing.T) {
-
-	allocsPerRun := testing.AllocsPerRun(3000, func() {
-		const value = "Hello World"
-		PrintString(w, value)
-		w.Assert(value)
-		PrintString(w, bigString)
-		w.Assert(bigString)
-	})
-
-	if allocsPerRun > 0 {
-		t.Errorf("PrintString is allocating %f", allocsPerRun)
-	}
-
-}
-
-func TestPrintFloat(t *testing.T) {
-
-	allocsPerRun := testing.AllocsPerRun(5000, func() {
-		PrintFloat(w, 44.4)
-		w.Assert("44.4")
-		PrintFloat(w, math.Pi)
-		w.Assert("3.141592653589793")
-		PrintFloatPrecision(w, math.Pi, 2)
-		w.Assert("3.14")
-		PrintFloatPrecision(w, math.Pi, 2)
-		w.Assert("3.14")
-		PrintFloatPrecision(w, -1.23, 2)
-		w.Assert("-1.23")
-		PrintFloatPrecision(w, 1.23, 2)
-		w.Assert("1.23")
-	})
-
-	if allocsPerRun > 0 {
-		t.Errorf("PrintFloat is allocating %f", allocsPerRun)
-	}
-}
-
-func TestPrintBytes(t *testing.T) {
-
-	hellobytes := []byte("Hello world!!")
-
-	allocsPerRun := testing.AllocsPerRun(5000, func() {
-		PrintValue(w, reflect.ValueOf(&hellobytes).Elem())
-		w.Assert("Hello world!!")
-	})
-
-	if allocsPerRun > 0 {
-		t.Errorf("PrintValue is allocating %f", allocsPerRun)
-	}
-}
-
-func TestPrintInt(t *testing.T) {
-
-	allocsPerRun := testing.AllocsPerRun(3000, func() {
-		PrintInt(w, -300)
-		w.Assert("-300")
-		PrintUint(w, 300)
-		w.Assert("300")
-	})
-
-	if allocsPerRun > 0 {
-		t.Errorf("Print(u)Int is allocating %f", allocsPerRun)
-	}
-}
-
-func BenchmarkPrintInt(b *testing.B) {
-	for i := 0; i < b.N; i++ {
-		PrintInt(ww, 9000000000)
-	}
-}
-
-func BenchmarkPrintFloat(b *testing.B) {
-	for i := 0; i < b.N; i++ {
-		PrintFloat(ww, 9000.000000)
-	}
-}
-
-func BenchmarkPrintFloatPrec(b *testing.B) {
-	for i := 0; i < b.N; i++ {
-		PrintFloatPrecision(ww, 9000.000000, 5)
-	}
-}
-
-func BenchmarkPrintString(b *testing.B) {
-	for i := 0; i < b.N; i++ {
-		PrintString(ww, "-------------------------------------------------------------------------------")
-	}
-}
-
-func BenchmarkPrintIntFmt(b *testing.B) {
-	for i := 0; i < b.N; i++ {
-		fmt.Fprint(ww, 9000000000)
-	}
-}
-
-func BenchmarkPrintFloatFmt(b *testing.B) {
-	for i := 0; i < b.N; i++ {
-		fmt.Fprint(ww, 9000.000000)
-	}
-}
-
-func BenchmarkPrintStringFmt(b *testing.B) {
-	for i := 0; i < b.N; i++ {
-		fmt.Fprint(ww, "-------------------------------------------------------------------------------")
-	}
-}