fix: trim imports per file — no unused imports in split files
This commit is contained in:
@@ -4,19 +4,11 @@ import (
|
|||||||
"database/sql"
|
"database/sql"
|
||||||
"fmt"
|
"fmt"
|
||||||
"net/http"
|
"net/http"
|
||||||
"os"
|
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"github.com/google/uuid"
|
|
||||||
"golang.org/x/crypto/bcrypt"
|
|
||||||
"gophergate/internal/db"
|
"gophergate/internal/db"
|
||||||
"gophergate/internal/models"
|
|
||||||
"gophergate/internal/utils"
|
|
||||||
"log/slog"
|
|
||||||
|
|
||||||
"github.com/shirou/gopsutil/v3/cpu"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type UsagePeriodFilter struct {
|
type UsagePeriodFilter struct {
|
||||||
|
|||||||
@@ -4,19 +4,12 @@ import (
|
|||||||
"database/sql"
|
"database/sql"
|
||||||
"fmt"
|
"fmt"
|
||||||
"net/http"
|
"net/http"
|
||||||
"os"
|
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"github.com/google/uuid"
|
"github.com/google/uuid"
|
||||||
"golang.org/x/crypto/bcrypt"
|
|
||||||
"gophergate/internal/db"
|
"gophergate/internal/db"
|
||||||
"gophergate/internal/models"
|
|
||||||
"gophergate/internal/utils"
|
|
||||||
"log/slog"
|
|
||||||
|
|
||||||
"github.com/shirou/gopsutil/v3/cpu"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func (s *Server) handleGetClients(c *gin.Context) {
|
func (s *Server) handleGetClients(c *gin.Context) {
|
||||||
|
|||||||
@@ -4,23 +4,15 @@ import (
|
|||||||
"database/sql"
|
"database/sql"
|
||||||
"fmt"
|
"fmt"
|
||||||
"net/http"
|
"net/http"
|
||||||
"os"
|
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
|
||||||
"github.com/google/uuid"
|
|
||||||
"golang.org/x/crypto/bcrypt"
|
|
||||||
"gophergate/internal/db"
|
|
||||||
"gophergate/internal/models"
|
|
||||||
"gophergate/internal/utils"
|
|
||||||
"log/slog"
|
"log/slog"
|
||||||
|
|
||||||
"github.com/shirou/gopsutil/v3/cpu"
|
"github.com/gin-gonic/gin"
|
||||||
"github.com/shirou/gopsutil/v3/disk"
|
"golang.org/x/crypto/bcrypt"
|
||||||
"github.com/shirou/gopsutil/v3/load"
|
"gophergate/internal/db"
|
||||||
"github.com/shirou/gopsutil/v3/mem"
|
"gophergate/internal/utils"
|
||||||
"github.com/shirou/gopsutil/v3/process"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
type ApiResponse struct {
|
type ApiResponse struct {
|
||||||
|
|||||||
@@ -1,22 +1,18 @@
|
|||||||
package server
|
package server
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"database/sql"
|
|
||||||
"fmt"
|
"fmt"
|
||||||
"net/http"
|
"net/http"
|
||||||
"os"
|
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"log/slog"
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"github.com/google/uuid"
|
"github.com/google/uuid"
|
||||||
"golang.org/x/crypto/bcrypt"
|
|
||||||
"gophergate/internal/db"
|
"gophergate/internal/db"
|
||||||
"gophergate/internal/models"
|
"gophergate/internal/models"
|
||||||
"gophergate/internal/utils"
|
"gophergate/internal/utils"
|
||||||
"log/slog"
|
|
||||||
|
|
||||||
"github.com/shirou/gopsutil/v3/cpu"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func (s *Server) handleGetModels(c *gin.Context) {
|
func (s *Server) handleGetModels(c *gin.Context) {
|
||||||
|
|||||||
@@ -1,22 +1,17 @@
|
|||||||
package server
|
package server
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"database/sql"
|
|
||||||
"fmt"
|
"fmt"
|
||||||
"net/http"
|
"net/http"
|
||||||
"os"
|
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"log/slog"
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"github.com/google/uuid"
|
|
||||||
"golang.org/x/crypto/bcrypt"
|
|
||||||
"gophergate/internal/db"
|
"gophergate/internal/db"
|
||||||
"gophergate/internal/models"
|
"gophergate/internal/models"
|
||||||
"gophergate/internal/utils"
|
"gophergate/internal/utils"
|
||||||
"log/slog"
|
|
||||||
|
|
||||||
"github.com/shirou/gopsutil/v3/cpu"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func (s *Server) handleGetProviders(c *gin.Context) {
|
func (s *Server) handleGetProviders(c *gin.Context) {
|
||||||
|
|||||||
@@ -1,22 +1,23 @@
|
|||||||
package server
|
package server
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"database/sql"
|
|
||||||
"fmt"
|
"fmt"
|
||||||
"net/http"
|
"net/http"
|
||||||
"os"
|
"os"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
|
||||||
"github.com/google/uuid"
|
|
||||||
"golang.org/x/crypto/bcrypt"
|
|
||||||
"gophergate/internal/db"
|
|
||||||
"gophergate/internal/models"
|
|
||||||
"gophergate/internal/utils"
|
|
||||||
"log/slog"
|
"log/slog"
|
||||||
|
|
||||||
|
"github.com/gin-gonic/gin"
|
||||||
|
"gophergate/internal/db"
|
||||||
|
"gophergate/internal/utils"
|
||||||
|
|
||||||
"github.com/shirou/gopsutil/v3/cpu"
|
"github.com/shirou/gopsutil/v3/cpu"
|
||||||
|
"github.com/shirou/gopsutil/v3/disk"
|
||||||
|
"github.com/shirou/gopsutil/v3/load"
|
||||||
|
"github.com/shirou/gopsutil/v3/mem"
|
||||||
|
"github.com/shirou/gopsutil/v3/process"
|
||||||
)
|
)
|
||||||
|
|
||||||
func (s *Server) handleSystemHealth(c *gin.Context) {
|
func (s *Server) handleSystemHealth(c *gin.Context) {
|
||||||
|
|||||||
@@ -1,22 +1,14 @@
|
|||||||
package server
|
package server
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"database/sql"
|
|
||||||
"fmt"
|
"fmt"
|
||||||
"net/http"
|
"net/http"
|
||||||
"os"
|
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
"github.com/google/uuid"
|
|
||||||
"golang.org/x/crypto/bcrypt"
|
"golang.org/x/crypto/bcrypt"
|
||||||
"gophergate/internal/db"
|
"gophergate/internal/db"
|
||||||
"gophergate/internal/models"
|
|
||||||
"gophergate/internal/utils"
|
|
||||||
"log/slog"
|
|
||||||
|
|
||||||
"github.com/shirou/gopsutil/v3/cpu"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func (s *Server) handleGetUsers(c *gin.Context) {
|
func (s *Server) handleGetUsers(c *gin.Context) {
|
||||||
|
|||||||
Reference in New Issue
Block a user