diff --git a/vendor/github.com/DisposaBoy/JsonConfigReader/AUTHORS.md b/vendor/github.com/DisposaBoy/JsonConfigReader/AUTHORS.md index d495fb75e..bf9d74f5d 100644 --- a/vendor/github.com/DisposaBoy/JsonConfigReader/AUTHORS.md +++ b/vendor/github.com/DisposaBoy/JsonConfigReader/AUTHORS.md @@ -2,3 +2,4 @@ This is the official list of JsonConfigReader authors for copyright purposes. * DisposaBoy `https://github.com/DisposaBoy` * Steven Osborn `https://github.com/steve918` +* Andreas Jaekle `https://github.com/ekle` diff --git a/vendor/github.com/DisposaBoy/JsonConfigReader/README.md b/vendor/github.com/DisposaBoy/JsonConfigReader/README.md index 5df220753..f6eadf352 100644 --- a/vendor/github.com/DisposaBoy/JsonConfigReader/README.md +++ b/vendor/github.com/DisposaBoy/JsonConfigReader/README.md @@ -1,6 +1,14 @@ +[![Build Status](https://travis-ci.org/DisposaBoy/JsonConfigReader.svg?branch=master)](https://travis-ci.org/DisposaBoy/JsonConfigReader) + +
+ + + + JsonConfigReader is a proxy for [golang's io.Reader](http://golang.org/pkg/io/#Reader) that strips line comments and trailing commas, allowing you to use json as a *reasonable* config format. Comments start with `//` and continue to the end of the line. +Multiline comments are also supported with `/*` and `*/`. If a trailing comma is in front of `]` or `}` it will be stripped as well. @@ -9,9 +17,15 @@ Given `settings.json` { "key": "value", // k:v - + // a list of numbers "list": [1, 2, 3], + + /* + a list of numbers + which are important + */ + "numbers": [1, 2, 3], } diff --git a/vendor/github.com/DisposaBoy/JsonConfigReader/reader.go b/vendor/github.com/DisposaBoy/JsonConfigReader/reader.go index 06ae65d20..d1a675e0b 100644 --- a/vendor/github.com/DisposaBoy/JsonConfigReader/reader.go +++ b/vendor/github.com/DisposaBoy/JsonConfigReader/reader.go @@ -25,6 +25,24 @@ func consumeComment(s []byte, i int) int { s[i] = ' ' } } + if i < len(s) && s[i] == '*' { + s[i-1] = ' ' + s[i] = ' ' + for ; i < len(s); i += 1 { + if s[i] != '*' { + s[i] = ' ' + } else { + s[i] = ' ' + i++ + if i < len(s) { + if s[i] == '/' { + s[i] = ' ' + break + } + } + } + } + } return i } diff --git a/vendor/vendor.json b/vendor/vendor.json index c207c52e5..630968227 100644 --- a/vendor/vendor.json +++ b/vendor/vendor.json @@ -15,9 +15,10 @@ "revisionTime": "2016-09-16T22:17:49Z" }, { + "checksumSHA1": "3GJ+FRKP1nniJMokdcb/ZEcq3tE=", "path": "github.com/DisposaBoy/JsonConfigReader", - "revision": "33a99fdf1d5ee1f79b5077e9c06f955ad356d5f4", - "revisionTime": "2013-01-12T09:33:55Z" + "revision": "5ea4d0ddac554439159cd6f191cb94a110d73352", + "revisionTime": "2017-12-18T18:09:44Z" }, { "checksumSHA1": "E0NbOzBCBYViPKvM4XcloBu6GWE=",