fix: golangci lint

This commit is contained in:
qloog
2021-11-08 22:25:53 +08:00
parent 04bc69b051
commit 135deb1d1c
6 changed files with 15 additions and 20 deletions

View File

@@ -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

View File

@@ -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"

View File

@@ -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"
)

View File

@@ -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

View File

@@ -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"

View File

@@ -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 (