summaryrefslogtreecommitdiff
path: root/vendor/github.com/go-openapi/swag/json.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/go-openapi/swag/json.go')
-rw-r--r--vendor/github.com/go-openapi/swag/json.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/vendor/github.com/go-openapi/swag/json.go b/vendor/github.com/go-openapi/swag/json.go
index 7e9902ca3..c7caa9908 100644
--- a/vendor/github.com/go-openapi/swag/json.go
+++ b/vendor/github.com/go-openapi/swag/json.go
@@ -126,7 +126,8 @@ func ConcatJSON(blobs ...[]byte) []byte {
continue // don't know how to concatenate non container objects
}
- if len(b) < 3 { // yep empty but also the last one, so closing this thing
+ const minLengthIfNotEmpty = 3
+ if len(b) < minLengthIfNotEmpty { // yep empty but also the last one, so closing this thing
if i == last && a > 0 {
if err := buf.WriteByte(closing); err != nil {
log.Println(err)