Chore/build pipeline (#6)

* chg: chore: add linter

* chg: chore: update go

* new: chore: add pipeline

* chg: fix: dockerfile path

* chg: fix: main branch name

* chg: fix: add goimports

* chg: fix: remove goimports

* chg: fix: use goreleaser

* new: chore: add goreleaser config

* new: docs: add LICENSE

* chg: fix: container version

* chg: fix: dockerfile setup
This commit is contained in:
2024-04-28 11:52:01 -03:00
committed by GitHub
parent 268ece5650
commit 98f1700b21
12 changed files with 984 additions and 14 deletions

View File

@@ -53,7 +53,7 @@ func HandlerIndex(w http.ResponseWriter, r *http.Request) {
currentTime := time.Now().Format(time.RFC850)
w.Header().Set("Content-Type", "application/json")
w.WriteHeader(http.StatusOK)
json.NewEncoder(w).Encode(map[string]interface{}{
err := json.NewEncoder(w).Encode(map[string]interface{}{
"time": currentTime,
"endpoints": map[string]interface{}{
"/indexers/comando_torrents": map[string]interface{}{
@@ -74,4 +74,7 @@ func HandlerIndex(w http.ResponseWriter, r *http.Request) {
},
},
})
if err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)
}
}