Skip to content

Commit

Permalink
Format imports
Browse files Browse the repository at this point in the history
  • Loading branch information
massivemadness committed Sep 3, 2024
1 parent 82c7040 commit 923714b
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 11 deletions.
11 changes: 6 additions & 5 deletions cmd/articles-server/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ import (
"context"
"errors"
"fmt"
"net/http"
"os"
"os/signal"
"syscall"
"time"

"github.com/go-playground/validator/v10"
"github.com/massivemadness/articles-server/internal/api"
"github.com/massivemadness/articles-server/internal/api/server"
Expand All @@ -13,11 +19,6 @@ import (
"github.com/massivemadness/articles-server/internal/repository"
"github.com/massivemadness/articles-server/internal/storage"
"go.uber.org/zap"
"net/http"
"os"
"os/signal"
"syscall"
"time"
)

func main() {
Expand Down
5 changes: 3 additions & 2 deletions internal/api/middleware/logger.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
package middleware

import (
"github.com/go-chi/chi/v5/middleware"
"go.uber.org/zap"
"net/http"
"time"

"github.com/go-chi/chi/v5/middleware"
"go.uber.org/zap"
)

func Logger(logger *zap.Logger) func(next http.Handler) http.Handler {
Expand Down
2 changes: 1 addition & 1 deletion internal/api/router.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"github.com/go-chi/chi/v5/middleware"
mw "github.com/massivemadness/articles-server/internal/api/middleware"
"github.com/massivemadness/articles-server/internal/api/server"
"github.com/massivemadness/articles-server/internal/api/v1"
v1 "github.com/massivemadness/articles-server/internal/api/v1"
)

func NewRouter(wrapper *server.Wrapper) chi.Router {
Expand Down
5 changes: 3 additions & 2 deletions internal/api/v1/articles.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@ package v1

import (
"encoding/json"
"net/http"
"strconv"

"github.com/go-chi/chi/v5"
"github.com/massivemadness/articles-server/internal/api/server"
"github.com/massivemadness/articles-server/internal/entity"
"net/http"
"strconv"
)

func GetArticlesHandler(wrapper *server.Wrapper) http.HandlerFunc {
Expand Down
3 changes: 2 additions & 1 deletion internal/config/config.go
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
package config

import (
"github.com/ilyakaznacheev/cleanenv"
"log"
"os"
"time"

"github.com/ilyakaznacheev/cleanenv"
)

var (
Expand Down
1 change: 1 addition & 0 deletions internal/repository/articles.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package repository

import (
"context"

"github.com/massivemadness/articles-server/internal/entity"
"github.com/massivemadness/articles-server/internal/storage"
)
Expand Down
1 change: 1 addition & 0 deletions internal/storage/storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package storage
import (
"context"
"fmt"

"github.com/jackc/pgx/v5/pgxpool"
"github.com/massivemadness/articles-server/internal/config"
)
Expand Down

0 comments on commit 923714b

Please sign in to comment.