summaryrefslogtreecommitdiff
path: root/vendor/github.com/xeipuuv/gojsonschema/jsonContext.go
diff options
context:
space:
mode:
authorValentin Rothberg <rothberg@redhat.com>2019-01-08 14:52:57 +0100
committerValentin Rothberg <rothberg@redhat.com>2019-01-11 13:38:11 +0100
commitbd40dcfc2bc7c9014ea1f33482fb63aacbcdfe87 (patch)
tree5f06e4e289f16d9164d692590a3fe6541b5384cf /vendor/github.com/xeipuuv/gojsonschema/jsonContext.go
parent545f24421247c9f6251a634764db3f8f8070a812 (diff)
downloadpodman-bd40dcfc2bc7c9014ea1f33482fb63aacbcdfe87.tar.gz
podman-bd40dcfc2bc7c9014ea1f33482fb63aacbcdfe87.tar.bz2
podman-bd40dcfc2bc7c9014ea1f33482fb63aacbcdfe87.zip
vendor: update everything
* If possible, update each dependency to the latest available version. * Use releases over commit IDs and avoid vendoring branches. Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
Diffstat (limited to 'vendor/github.com/xeipuuv/gojsonschema/jsonContext.go')
-rw-r--r--vendor/github.com/xeipuuv/gojsonschema/jsonContext.go16
1 files changed, 8 insertions, 8 deletions
diff --git a/vendor/github.com/xeipuuv/gojsonschema/jsonContext.go b/vendor/github.com/xeipuuv/gojsonschema/jsonContext.go
index fcc8d9d6f..f40668a74 100644
--- a/vendor/github.com/xeipuuv/gojsonschema/jsonContext.go
+++ b/vendor/github.com/xeipuuv/gojsonschema/jsonContext.go
@@ -26,20 +26,20 @@ package gojsonschema
import "bytes"
-// jsonContext implements a persistent linked-list of strings
-type jsonContext struct {
+// JsonContext implements a persistent linked-list of strings
+type JsonContext struct {
head string
- tail *jsonContext
+ tail *JsonContext
}
-func newJsonContext(head string, tail *jsonContext) *jsonContext {
- return &jsonContext{head, tail}
+func NewJsonContext(head string, tail *JsonContext) *JsonContext {
+ return &JsonContext{head, tail}
}
// String displays the context in reverse.
// This plays well with the data structure's persistent nature with
// Cons and a json document's tree structure.
-func (c *jsonContext) String(del ...string) string {
+func (c *JsonContext) String(del ...string) string {
byteArr := make([]byte, 0, c.stringLen())
buf := bytes.NewBuffer(byteArr)
c.writeStringToBuffer(buf, del)
@@ -47,7 +47,7 @@ func (c *jsonContext) String(del ...string) string {
return buf.String()
}
-func (c *jsonContext) stringLen() int {
+func (c *JsonContext) stringLen() int {
length := 0
if c.tail != nil {
length = c.tail.stringLen() + 1 // add 1 for "."
@@ -57,7 +57,7 @@ func (c *jsonContext) stringLen() int {
return length
}
-func (c *jsonContext) writeStringToBuffer(buf *bytes.Buffer, del []string) {
+func (c *JsonContext) writeStringToBuffer(buf *bytes.Buffer, del []string) {
if c.tail != nil {
c.tail.writeStringToBuffer(buf, del)