mirror of
https://github.com/go-eagle/eagle.git
synced 2025-12-24 13:37:56 +08:00
fix: golangci lint
This commit is contained in:
@@ -2,23 +2,17 @@ package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/go-eagle/eagle/pkg/config"
|
||||
"log"
|
||||
|
||||
"github.com/go-eagle/eagle/pkg/config"
|
||||
)
|
||||
|
||||
type Service struct {
|
||||
Name string
|
||||
Version string
|
||||
}
|
||||
|
||||
type Server struct {
|
||||
HTTP struct {
|
||||
Addr string
|
||||
Port string
|
||||
}
|
||||
}
|
||||
|
||||
func main() {
|
||||
type Service struct {
|
||||
Name string
|
||||
Version string
|
||||
}
|
||||
|
||||
c := config.New(".")
|
||||
|
||||
var svc Service
|
||||
|
||||
@@ -3,12 +3,12 @@ package dao
|
||||
import (
|
||||
"context"
|
||||
"flag"
|
||||
"github.com/go-eagle/eagle/pkg/app"
|
||||
"testing"
|
||||
|
||||
"github.com/spf13/pflag"
|
||||
|
||||
"github.com/go-eagle/eagle/internal/model"
|
||||
"github.com/go-eagle/eagle/pkg/app"
|
||||
"github.com/go-eagle/eagle/pkg/config"
|
||||
logger "github.com/go-eagle/eagle/pkg/log"
|
||||
"github.com/go-eagle/eagle/pkg/testing/lich"
|
||||
|
||||
@@ -2,7 +2,6 @@ package routers
|
||||
|
||||
import (
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/go-eagle/eagle/pkg/app"
|
||||
"github.com/prometheus/client_golang/prometheus/promhttp"
|
||||
ginSwagger "github.com/swaggo/gin-swagger" //nolint: goimports
|
||||
"github.com/swaggo/gin-swagger/swaggerFiles"
|
||||
@@ -13,6 +12,7 @@ import (
|
||||
"github.com/go-eagle/eagle/api"
|
||||
"github.com/go-eagle/eagle/internal/handler/v1/user"
|
||||
mw "github.com/go-eagle/eagle/internal/middleware"
|
||||
"github.com/go-eagle/eagle/pkg/app"
|
||||
"github.com/go-eagle/eagle/pkg/middleware"
|
||||
)
|
||||
|
||||
|
||||
@@ -1,14 +1,15 @@
|
||||
package server
|
||||
|
||||
import (
|
||||
"github.com/go-eagle/eagle/pkg/app"
|
||||
"log"
|
||||
|
||||
"net"
|
||||
|
||||
"google.golang.org/grpc"
|
||||
|
||||
v1 "github.com/go-eagle/eagle/api/grpc/user/v1"
|
||||
"github.com/go-eagle/eagle/internal/service"
|
||||
"github.com/go-eagle/eagle/pkg/app"
|
||||
)
|
||||
|
||||
// NewGRPCServer creates a gRPC server
|
||||
|
||||
3
main.go
3
main.go
@@ -18,8 +18,6 @@ import (
|
||||
"net/http"
|
||||
"os"
|
||||
|
||||
"github.com/go-eagle/eagle/pkg/config"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/spf13/pflag"
|
||||
_ "go.uber.org/automaxprocs"
|
||||
@@ -29,6 +27,7 @@ import (
|
||||
"github.com/go-eagle/eagle/internal/server"
|
||||
"github.com/go-eagle/eagle/internal/service"
|
||||
eagle "github.com/go-eagle/eagle/pkg/app"
|
||||
"github.com/go-eagle/eagle/pkg/config"
|
||||
logger "github.com/go-eagle/eagle/pkg/log"
|
||||
"github.com/go-eagle/eagle/pkg/redis"
|
||||
v "github.com/go-eagle/eagle/pkg/version"
|
||||
|
||||
@@ -2,12 +2,13 @@ package config
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"github.com/fsnotify/fsnotify"
|
||||
"github.com/spf13/viper"
|
||||
"log"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"sync"
|
||||
|
||||
"github.com/fsnotify/fsnotify"
|
||||
"github.com/spf13/viper"
|
||||
)
|
||||
|
||||
var (
|
||||
|
||||
Reference in New Issue
Block a user