From 8c01e61a1d74dff65df7ada319c201e4471ddb24 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jakub=20Mik=C5=82asz?= Date: Sun, 6 Feb 2022 11:50:44 +0100 Subject: [PATCH] remove redundant code, fix formatting --- swagger.go | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/swagger.go b/swagger.go index 117e601..8c0ea81 100644 --- a/swagger.go +++ b/swagger.go @@ -106,11 +106,10 @@ func Handler(configFns ...func(*Config)) http.HandlerFunc { var once sync.Once config := &Config{ - URL: "doc.json", - DeepLinking: true, - DocExpansion: "list", - DomID: "#swagger-ui", - PersistAuthorization: false, + URL: "doc.json", + DeepLinking: true, + DocExpansion: "list", + DomID: "#swagger-ui", } for _, configFn := range configFns { configFn(config) @@ -243,7 +242,7 @@ window.onload = function() { deepLinking: {{.DeepLinking}}, docExpansion: "{{.DocExpansion}}", dom_id: "{{.DomID}}", - persistAuthorization: {{.PersistAuthorization}}, + persistAuthorization: {{.PersistAuthorization}}, validatorUrl: null, presets: [ SwaggerUIBundle.presets.apis,