config-service.git

commit 5c759caf216bf016d9bc3ed716c99e31e3047b4d

Author: Paolo Lulli <paolo@lulli.net>

Formatting

 routes.go | 28 ++++++++++++++--------------


diff --git a/routes.go b/routes.go
index 892cc44e468583b821126d95e051c4013080a83c..fb89a96c354f4b81cffd78be43645222a3640063 100644
--- a/routes.go
+++ b/routes.go
@@ -11,23 +11,23 @@
 package main
 
 import (
-    "net/http"
+	"net/http"
 
-    "github.com/gin-gonic/gin"
+	"github.com/gin-gonic/gin"
 )
 
 func ReadSecret(cfg ConfigServiceConfig) gin.HandlerFunc {
-    return func(c *gin.Context) {
-        var secretName = c.Param("secretname")
-        if secretName == "" {
-            c.JSONP(http.StatusCreated, gin.H{"error": "missing secret param", "status": "error"})
-        }
+	return func(c *gin.Context) {
+		var secretName = c.Param("secretname")
+		if secretName == "" {
+			c.JSONP(http.StatusCreated, gin.H{"error": "missing secret param", "status": "error"})
+		}
 
-        password, ko := GetPassword(cfg.KeepassKeyStoreFile, cfg.KeepassSecretKeyFile, secretName)
-        if ko {
-            c.JSONP(http.StatusCreated, gin.H{"error": "secret not found", "status": "error"})
-            return
-        }
-        c.JSONP(http.StatusCreated, gin.H{"secret": secretName, "value": password})
-    }
+		password, ko := GetPassword(cfg.KeepassKeyStoreFile, cfg.KeepassSecretKeyFile, secretName)
+		if ko {
+			c.JSONP(http.StatusCreated, gin.H{"error": "secret not found", "status": "error"})
+			return
+		}
+		c.JSONP(http.StatusCreated, gin.H{"secret": secretName, "value": password})
+	}
 }