From 1d4212c8ca7fc0da161a59a02f135626f9fd3586 Mon Sep 17 00:00:00 2001 From: Erin Rivas Date: Thu, 28 Sep 2023 13:31:09 -0500 Subject: [PATCH] lint and version bump --- README.md | 2 +- japicore/fidRouteHandling.go | 7 ++++--- japicore/miscRouteHandling.go | 3 ++- japicore/utils.go | 3 ++- jutils/jutils_test.go | 28 +++++++++++++--------------- 5 files changed, 22 insertions(+), 21 deletions(-) diff --git a/README.md b/README.md index e7090e8..3a913d7 100644 --- a/README.md +++ b/README.md @@ -12,7 +12,7 @@ seed-phrase of the API. ```shell git clone https://github.com/JackalLabs/jackalapi.git cd jackalapi -git checkout v0.1.0 +git checkout v0.2.0 go make install ``` diff --git a/japicore/fidRouteHandling.go b/japicore/fidRouteHandling.go index 051de66..dc2fe8b 100644 --- a/japicore/fidRouteHandling.go +++ b/japicore/fidRouteHandling.go @@ -3,11 +3,12 @@ package japicore import ( "bytes" "fmt" + "net/http" + "strings" + "github.com/JackalLabs/jackalapi/jutils" "github.com/JackalLabs/jackalgo/handlers/file_io_handler" "github.com/uptrace/bunrouter" - "net/http" - "strings" ) func IpfsHandler(fileIo *file_io_handler.FileIoHandler, queue *FileIoQueue) bunrouter.HandlerFunc { @@ -112,7 +113,7 @@ func DeleteByFidHandler(fileIo *file_io_handler.FileIoHandler, queue *FileIoQueu // return err //} - //message := createJsonResponse("Deletion complete") + // message := createJsonResponse("Deletion complete") message := createJsonResponse("Deletion Not Implemented") condensedWriteJSON(w, message) return nil diff --git a/japicore/miscRouteHandling.go b/japicore/miscRouteHandling.go index 15426e5..e32d221 100644 --- a/japicore/miscRouteHandling.go +++ b/japicore/miscRouteHandling.go @@ -2,9 +2,10 @@ package japicore import ( "fmt" + "net/http" + "github.com/JackalLabs/jackalapi/jutils" "github.com/uptrace/bunrouter" - "net/http" ) var ( diff --git a/japicore/utils.go b/japicore/utils.go index 06159c5..29051d0 100644 --- a/japicore/utils.go +++ b/japicore/utils.go @@ -4,10 +4,11 @@ import ( "bytes" "encoding/json" "fmt" - "github.com/uptrace/bunrouter" "net/http" "sync" + "github.com/uptrace/bunrouter" + "github.com/JackalLabs/jackalapi/jutils" "github.com/JackalLabs/jackalgo/handlers/file_io_handler" "github.com/JackalLabs/jackalgo/handlers/file_upload_handler" diff --git a/jutils/jutils_test.go b/jutils/jutils_test.go index 312fefc..2c819a4 100644 --- a/jutils/jutils_test.go +++ b/jutils/jutils_test.go @@ -25,21 +25,19 @@ type testCase struct { shouldPanic bool } -var ( - tt = []testCase{ - { - name: "env var exists", - varId: "MOCK_ENV_VAR", - shouldPanic: false, - }, - { - name: "env var doesn't exist", - varId: "I_DONT_EXIST", - fallBack: "fallback_var", - shouldPanic: true, - }, - } -) +var tt = []testCase{ + { + name: "env var exists", + varId: "MOCK_ENV_VAR", + shouldPanic: false, + }, + { + name: "env var doesn't exist", + varId: "I_DONT_EXIST", + fallBack: "fallback_var", + shouldPanic: true, + }, +} // Env funcs func TestLoadEnvVarOrFallback(t *testing.T) {