From 2ace4a3f7b1c0040d0e8bd606545ee3dbbb4731a Mon Sep 17 00:00:00 2001 From: Knut Ahlers Date: Thu, 3 Aug 2017 20:12:15 +0200 Subject: [PATCH] Follow linter advices Signed-off-by: Knut Ahlers --- README.md | 5 +++++ main.go | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 39485e9..7823656 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,8 @@ +![](https://badges.fyi/github/license/Luzifer/ots) +![](https://badges.fyi/github/latest-release/Luzifer/ots) +![](https://badges.fyi/github/downloads/Luzifer/ots) +[![Go Report Card](https://goreportcard.com/badge/github.com/Luzifer/ots)](https://goreportcard.com/report/github.com/Luzifer/ots) + # Luzifer / OTS `ots` is a one-time-secret sharing platform. The secret is encrypted with a symmetric 256bit AES encryption in the browser before being sent to the server. Afterwards an URL containing the ID of the secret and the password is generated. The password is never sent to the server so the server will never be able to decrypt the secrets it delivers with a reasonable effort. Also the secret is immediately deleted on the first read. diff --git a/main.go b/main.go index a8aab98..fae09ef 100644 --- a/main.go +++ b/main.go @@ -65,7 +65,7 @@ func assetDelivery(res http.ResponseWriter, r *http.Request) { assetName = "/index.html" } - ext := assetName[strings.LastIndex(assetName, "."):len(assetName)] + ext := assetName[strings.LastIndex(assetName, "."):] assetData, err := Asset(path.Join("frontend", assetName)) if err != nil { http.Error(res, "404 not found", http.StatusNotFound)