From c473e41b45d8f0709ed618115e5f4201f7320bce Mon Sep 17 00:00:00 2001 From: Sky Johnson Date: Mon, 11 Aug 2025 13:22:20 -0500 Subject: [PATCH] rename utils to helpers --- internal/auth/cookies.go | 6 +++--- internal/{utils => helpers}/http.go | 2 +- internal/{utils => helpers}/scanner/scanner.go | 0 internal/users/users.go | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) rename internal/{utils => helpers}/http.go (95%) rename internal/{utils => helpers}/scanner/scanner.go (100%) diff --git a/internal/auth/cookies.go b/internal/auth/cookies.go index 5904a56..115104a 100644 --- a/internal/auth/cookies.go +++ b/internal/auth/cookies.go @@ -2,8 +2,8 @@ package auth import ( "dk/internal/cookies" + "dk/internal/helpers" "dk/internal/session" - "dk/internal/utils" "time" "github.com/valyala/fasthttp" @@ -18,7 +18,7 @@ func SetSessionCookie(ctx *fasthttp.RequestCtx, sessionID string) { Path: "/", Expires: time.Now().Add(session.DefaultExpiration), HTTPOnly: true, - Secure: utils.IsHTTPS(ctx), + Secure: helpers.IsHTTPS(ctx), SameSite: "lax", }) } @@ -29,4 +29,4 @@ func GetSessionCookie(ctx *fasthttp.RequestCtx) string { func DeleteSessionCookie(ctx *fasthttp.RequestCtx) { cookies.DeleteCookie(ctx, SessionCookieName) -} \ No newline at end of file +} diff --git a/internal/utils/http.go b/internal/helpers/http.go similarity index 95% rename from internal/utils/http.go rename to internal/helpers/http.go index 516c737..ea1b305 100644 --- a/internal/utils/http.go +++ b/internal/helpers/http.go @@ -1,4 +1,4 @@ -package utils +package helpers import "github.com/valyala/fasthttp" diff --git a/internal/utils/scanner/scanner.go b/internal/helpers/scanner/scanner.go similarity index 100% rename from internal/utils/scanner/scanner.go rename to internal/helpers/scanner/scanner.go diff --git a/internal/users/users.go b/internal/users/users.go index 1a52183..a3a42ab 100644 --- a/internal/users/users.go +++ b/internal/users/users.go @@ -6,7 +6,7 @@ import ( "time" "dk/internal/database" - "dk/internal/utils/scanner" + "dk/internal/helpers/scanner" "zombiezen.com/go/sqlite" )