Skip to content

Commit

Permalink
linter.
Browse files Browse the repository at this point in the history
  • Loading branch information
kehiy committed Jan 4, 2025
1 parent 6f39d4f commit 352be91
Show file tree
Hide file tree
Showing 14 changed files with 39 additions and 37 deletions.
6 changes: 3 additions & 3 deletions cmd/commands/run.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import (
"os/signal"
"syscall"

"github.com/dezh-tech/go-echo-boilerplate/cmd/daemon"
"github.com/dezh-tech/go-echo-boilerplate/config"
"github.com/dezh-tech/go-echo-boilerplate/pkg/logger"
"github.com/dezh-tech/geb/cmd/daemon"
"github.com/dezh-tech/geb/config"
"github.com/dezh-tech/geb/pkg/logger"
)

func HandleRun(args []string) {
Expand Down
18 changes: 9 additions & 9 deletions cmd/daemon/daemon.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ package daemon
import (
"time"

"github.com/dezh-tech/go-echo-boilerplate/config"
"github.com/dezh-tech/go-echo-boilerplate/delivery/grpc"
"github.com/dezh-tech/go-echo-boilerplate/delivery/http"
"github.com/dezh-tech/go-echo-boilerplate/infrastructure/database"
grpcclient "github.com/dezh-tech/go-echo-boilerplate/infrastructure/grpc_client"
"github.com/dezh-tech/go-echo-boilerplate/infrastructure/redis"
"github.com/dezh-tech/go-echo-boilerplate/pkg/logger"
userrepo "github.com/dezh-tech/go-echo-boilerplate/repository/user"
usersrv "github.com/dezh-tech/go-echo-boilerplate/service/user"
"github.com/dezh-tech/geb/config"
"github.com/dezh-tech/geb/delivery/grpc"
"github.com/dezh-tech/geb/delivery/http"
"github.com/dezh-tech/geb/infrastructure/database"
grpcclient "github.com/dezh-tech/geb/infrastructure/grpc_client"
"github.com/dezh-tech/geb/infrastructure/redis"
"github.com/dezh-tech/geb/pkg/logger"
userrepo "github.com/dezh-tech/geb/repository/user"
usersrv "github.com/dezh-tech/geb/service/user"
)

type Daemon struct {
Expand Down
4 changes: 2 additions & 2 deletions cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import (
"fmt"
"os"

"github.com/dezh-tech/go-echo-boilerplate"
"github.com/dezh-tech/go-echo-boilerplate/cmd/commands"
goginboilerplate "github.com/dezh-tech/geb"
"github.com/dezh-tech/geb/cmd/commands"
)

func main() {
Expand Down
14 changes: 7 additions & 7 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ package config
import (
"os"

"github.com/dezh-tech/go-echo-boilerplate/delivery/grpc"
"github.com/dezh-tech/go-echo-boilerplate/delivery/http"
"github.com/dezh-tech/go-echo-boilerplate/infrastructure/database"
grpcclient "github.com/dezh-tech/go-echo-boilerplate/infrastructure/grpc_client"
"github.com/dezh-tech/go-echo-boilerplate/infrastructure/redis"
"github.com/dezh-tech/go-echo-boilerplate/pkg/logger"
"github.com/dezh-tech/geb/delivery/grpc"
"github.com/dezh-tech/geb/delivery/http"
"github.com/dezh-tech/geb/infrastructure/database"
grpcclient "github.com/dezh-tech/geb/infrastructure/grpc_client"
"github.com/dezh-tech/geb/infrastructure/redis"
"github.com/dezh-tech/geb/pkg/logger"
"github.com/joho/godotenv"
"gopkg.in/yaml.v3"
)
Expand Down Expand Up @@ -49,7 +49,7 @@ func Load(path string) (*Config, error) {
config.Database.URI = os.Getenv("MONGO_URI")
config.RedisConf.URI = os.Getenv("REDIS_URI")

if err = config.basicCheck(); err != nil {
if err := config.basicCheck(); err != nil {
return nil, err
}

Expand Down
4 changes: 2 additions & 2 deletions delivery/grpc/health.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import (
"context"
"time"

"github.com/dezh-tech/go-echo-boilerplate"
pb "github.com/dezh-tech/go-echo-boilerplate/delivery/grpc/gen"
goginboilerplate "github.com/dezh-tech/geb"
pb "github.com/dezh-tech/geb/delivery/grpc/gen"
)

type healthServer struct {
Expand Down
6 changes: 3 additions & 3 deletions delivery/grpc/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import (
"strconv"
"time"

pb "github.com/dezh-tech/go-echo-boilerplate/delivery/grpc/gen"
"github.com/dezh-tech/go-echo-boilerplate/infrastructure/database"
"github.com/dezh-tech/go-echo-boilerplate/infrastructure/redis"
pb "github.com/dezh-tech/geb/delivery/grpc/gen"
"github.com/dezh-tech/geb/infrastructure/database"
"github.com/dezh-tech/geb/infrastructure/redis"
"google.golang.org/grpc"
)

Expand Down
4 changes: 2 additions & 2 deletions delivery/http/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ package http
import (
"fmt"

userh "github.com/dezh-tech/go-echo-boilerplate/delivery/http/user_handler"
users "github.com/dezh-tech/go-echo-boilerplate/service/user"
userh "github.com/dezh-tech/geb/delivery/http/user_handler"
users "github.com/dezh-tech/geb/service/user"
"github.com/labstack/echo/v4"
)

Expand Down
2 changes: 1 addition & 1 deletion delivery/http/user_handler/handler.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package userhandler

import "github.com/dezh-tech/go-echo-boilerplate/service/user"
import "github.com/dezh-tech/geb/service/user"

type Handler struct {
userSvc user.Service
Expand Down
2 changes: 1 addition & 1 deletion delivery/http/user_handler/profile.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package userhandler
import (
"net/http"

"github.com/dezh-tech/go-echo-boilerplate/service/user"
"github.com/dezh-tech/geb/service/user"
"github.com/labstack/echo/v4"
)

Expand Down
2 changes: 1 addition & 1 deletion delivery/http/user_handler/router.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package userhandler

import (
"github.com/dezh-tech/go-echo-boilerplate/delivery/http/middleware"
"github.com/dezh-tech/geb/delivery/http/middleware"
"github.com/labstack/echo/v4"
)

Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/dezh-tech/go-echo-boilerplate
module github.com/dezh-tech/geb

go 1.23.3

Expand Down
2 changes: 1 addition & 1 deletion infrastructure/grpc_client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ package grpcclient
import (
"context"

pb "github.com/dezh-tech/go-echo-boilerplate/infrastructure/grpc_client/gen"
pb "github.com/dezh-tech/geb/infrastructure/grpc_client/gen"
"google.golang.org/grpc"
"google.golang.org/grpc/credentials/insecure"
)
Expand Down
8 changes: 5 additions & 3 deletions repository/user/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ package user

import (
"context"
"errors"

"github.com/dezh-tech/go-echo-boilerplate/entity"
"github.com/dezh-tech/go-echo-boilerplate/infrastructure/database"
"github.com/dezh-tech/geb/entity"
"github.com/dezh-tech/geb/infrastructure/database"
"go.mongodb.org/mongo-driver/bson"
"go.mongodb.org/mongo-driver/mongo"
)
Expand Down Expand Up @@ -45,9 +46,10 @@ func (u User) GetByPubkey(pubkey string) (entity.User, error) {
var usr entity.User
err := collection.FindOne(ctx, bson.M{"pubkey": pubkey}).Decode(&usr)
if err != nil {
if err == mongo.ErrNoDocuments {
if errors.Is(err, mongo.ErrNoDocuments) {
return usr, nil
}

return usr, err
}

Expand Down
2 changes: 1 addition & 1 deletion service/user/service.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package user

import (
"github.com/dezh-tech/go-echo-boilerplate/entity"
"github.com/dezh-tech/geb/entity"
)

type Repository interface {
Expand Down

0 comments on commit 352be91

Please sign in to comment.