fix: goimports — strip unused imports from all server files
CI / Lint (push) Has been cancelled
CI / Test (push) Has been cancelled
CI / Build (push) Has been cancelled

This commit is contained in:
2026-04-26 15:00:04 -04:00
parent e598150d90
commit 5e0c10db01
9 changed files with 14 additions and 39 deletions
-3
View File
@@ -1,14 +1,12 @@
package server
import (
"database/sql"
"fmt"
"net/http"
"strings"
"time"
"github.com/gin-gonic/gin"
"gophergate/internal/db"
)
type UsagePeriodFilter struct {
@@ -372,4 +370,3 @@ func (s *Server) handleDetailedUsage(c *gin.Context) {
c.JSON(http.StatusOK, SuccessResponse(results))
}
+2 -4
View File
@@ -2,14 +2,13 @@ package server
import (
"database/sql"
"fmt"
"net/http"
"strings"
"time"
"gophergate/internal/db"
"github.com/gin-gonic/gin"
"github.com/google/uuid"
"gophergate/internal/db"
)
func (s *Server) handleGetClients(c *gin.Context) {
@@ -272,4 +271,3 @@ func (s *Server) handleDeleteClientToken(c *gin.Context) {
c.JSON(http.StatusOK, SuccessResponse(gin.H{"message": "Token revoked"}))
}
+1 -6
View File
@@ -1,18 +1,14 @@
package server
import (
"database/sql"
"fmt"
"net/http"
"strings"
"time"
"log/slog"
"gophergate/internal/db"
"github.com/gin-gonic/gin"
"golang.org/x/crypto/bcrypt"
"gophergate/internal/db"
"gophergate/internal/utils"
)
type ApiResponse struct {
@@ -166,4 +162,3 @@ func (s *Server) handleLogout(c *gin.Context) {
}
c.JSON(http.StatusOK, SuccessResponse(gin.H{"message": "Logged out"}))
}
+1 -8
View File
@@ -3,16 +3,10 @@ package server
import (
"fmt"
"net/http"
"strings"
"time"
"log/slog"
"gophergate/internal/db"
"github.com/gin-gonic/gin"
"github.com/google/uuid"
"gophergate/internal/db"
"gophergate/internal/models"
"gophergate/internal/utils"
)
func (s *Server) handleGetModels(c *gin.Context) {
@@ -234,4 +228,3 @@ func (s *Server) handleUpdateModel(c *gin.Context) {
c.JSON(http.StatusOK, SuccessResponse(gin.H{"message": "Model updated"}))
}
+3 -4
View File
@@ -1,17 +1,17 @@
package server
import (
"database/sql"
"fmt"
"net/http"
"strings"
"time"
"log/slog"
"github.com/gin-gonic/gin"
"gophergate/internal/db"
"gophergate/internal/models"
"gophergate/internal/utils"
"github.com/gin-gonic/gin"
)
func (s *Server) handleGetProviders(c *gin.Context) {
@@ -240,4 +240,3 @@ func (s *Server) handleTestProvider(c *gin.Context) {
"latency": latency,
}))
}
-1
View File
@@ -12,7 +12,6 @@ import (
"gophergate/internal/config"
"gophergate/internal/db"
"gophergate/internal/middleware"
"log/slog"
"gophergate/internal/models"
"gophergate/internal/providers"
"gophergate/internal/utils"
+1 -4
View File
@@ -4,14 +4,11 @@ import (
"fmt"
"net/http"
"os"
"strings"
"time"
"log/slog"
"gophergate/internal/db"
"github.com/gin-gonic/gin"
"gophergate/internal/db"
"gophergate/internal/utils"
"github.com/shirou/gopsutil/v3/cpu"
"github.com/shirou/gopsutil/v3/disk"
+2 -5
View File
@@ -1,14 +1,12 @@
package server
import (
"fmt"
"net/http"
"strings"
"time"
"gophergate/internal/db"
"github.com/gin-gonic/gin"
"golang.org/x/crypto/bcrypt"
"gophergate/internal/db"
)
func (s *Server) handleGetUsers(c *gin.Context) {
@@ -109,4 +107,3 @@ func (s *Server) handleDeleteUser(c *gin.Context) {
c.JSON(http.StatusOK, SuccessResponse(gin.H{"message": "User deleted"}))
}