Skip to content

Commit

Permalink
gci
Browse files Browse the repository at this point in the history
  • Loading branch information
cubny committed Feb 12, 2024
1 parent 14f5fee commit 0ea5184
Show file tree
Hide file tree
Showing 17 changed files with 48 additions and 33 deletions.
6 changes: 3 additions & 3 deletions internal/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,14 @@ import (
"database/sql"
"embed"
"fmt"
"github.com/cubny/lite-reader/internal/infra/job"
"github.com/mmcdole/gofeed"
"github.com/nikhil1raghav/feedfinder"
"net/http"
"os"
"os/signal"
"time"

_ "github.com/mattn/go-sqlite3"
"github.com/mmcdole/gofeed"
"github.com/nikhil1raghav/feedfinder"
"github.com/pressly/goose/v3"
log "github.com/sirupsen/logrus"
"golang.org/x/sys/unix"
Expand All @@ -22,6 +21,7 @@ import (
"github.com/cubny/lite-reader/internal/app/item"
"github.com/cubny/lite-reader/internal/config"
"github.com/cubny/lite-reader/internal/infra/http/api"
"github.com/cubny/lite-reader/internal/infra/job"
feedRepo "github.com/cubny/lite-reader/internal/infra/sqlite/feed"
itemRepo "github.com/cubny/lite-reader/internal/infra/sqlite/item"
)
Expand Down
3 changes: 2 additions & 1 deletion internal/app/feed/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@ package feed
import (
"errors"
"fmt"
"github.com/cubny/lite-reader/internal/app/item"
"time"

"github.com/mmcdole/gofeed"

"github.com/cubny/lite-reader/internal/app/item"
)

type ServiceImpl struct {
Expand Down
6 changes: 3 additions & 3 deletions internal/app/feed/service_test.go
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
package feed_test

import (
"github.com/cubny/lite-reader/internal/app/feed"
"github.com/cubny/lite-reader/internal/app/item"
"github.com/mmcdole/gofeed"
"testing"
"time"

"github.com/mmcdole/gofeed"
"github.com/stretchr/testify/assert"
"go.uber.org/mock/gomock"

"github.com/cubny/lite-reader/internal/app/feed"
"github.com/cubny/lite-reader/internal/app/item"
mocks "github.com/cubny/lite-reader/internal/mocks/app/feed"
)

Expand Down
12 changes: 7 additions & 5 deletions internal/infra/http/api/feed_test.go
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
package api_test

import (
"github.com/cubny/lite-reader/internal/app/feed"
"github.com/cubny/lite-reader/internal/app/item"
mocks "github.com/cubny/lite-reader/internal/mocks/infra/http/api"
"github.com/stretchr/testify/assert"
"go.uber.org/mock/gomock"
"net/http"
"testing"
"time"

"github.com/stretchr/testify/assert"
"go.uber.org/mock/gomock"

"github.com/cubny/lite-reader/internal/app/feed"
"github.com/cubny/lite-reader/internal/app/item"
mocks "github.com/cubny/lite-reader/internal/mocks/infra/http/api"
)

func TestRouter_addFeed(t *testing.T) {
Expand Down
3 changes: 2 additions & 1 deletion internal/infra/http/api/item.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ package api

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

"github.com/julienschmidt/httprouter"
log "github.com/sirupsen/logrus"
"net/http"
)

func (h *Router) updateItem(w http.ResponseWriter, r *http.Request, p httprouter.Params) {
Expand Down
4 changes: 2 additions & 2 deletions internal/infra/http/api/item_test.go
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
package api_test

import (
"github.com/cubny/lite-reader/internal/app/item"
"github.com/stretchr/testify/assert"
"net/http"
"testing"

"github.com/stretchr/testify/assert"
"go.uber.org/mock/gomock"

"github.com/cubny/lite-reader/internal/app/item"
mocks "github.com/cubny/lite-reader/internal/mocks/infra/http/api"
)

Expand Down
10 changes: 6 additions & 4 deletions internal/infra/http/api/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,16 @@ package api

import (
"encoding/json"
"github.com/cubny/lite-reader/internal/app/feed"
"github.com/cubny/lite-reader/internal/app/item"
"github.com/julienschmidt/httprouter"
log "github.com/sirupsen/logrus"
"net/http"
"net/url"
"strconv"
"time"

"github.com/julienschmidt/httprouter"
log "github.com/sirupsen/logrus"

"github.com/cubny/lite-reader/internal/app/feed"
"github.com/cubny/lite-reader/internal/app/item"
)

type AddFeedRequest struct {
Expand Down
5 changes: 2 additions & 3 deletions internal/infra/http/api/router.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,11 @@ package api
import (
"net/http"

"github.com/cubny/lite-reader/internal/app/feed"
"github.com/cubny/lite-reader/internal/app/item"

"github.com/julienschmidt/httprouter"
log "github.com/sirupsen/logrus"

"github.com/cubny/lite-reader/internal/app/feed"
"github.com/cubny/lite-reader/internal/app/item"
"github.com/cubny/lite-reader/internal/infra/http/api/middleware"
)

Expand Down
3 changes: 2 additions & 1 deletion internal/infra/job/itemsjob.go
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
package job

import (
"github.com/cubny/lite-reader/internal/app/item"
log "github.com/sirupsen/logrus"

"github.com/cubny/lite-reader/internal/app/item"
)

type ItemsJob struct {
Expand Down
8 changes: 5 additions & 3 deletions internal/infra/job/itemsjob_test.go
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
package job_test

import (
"testing"

"github.com/stretchr/testify/assert"
"go.uber.org/mock/gomock"

"github.com/cubny/lite-reader/internal/app/feed"
"github.com/cubny/lite-reader/internal/app/item"
"github.com/cubny/lite-reader/internal/infra/job"
mocks "github.com/cubny/lite-reader/internal/mocks/infra/job"
"github.com/stretchr/testify/assert"
"go.uber.org/mock/gomock"
"testing"
)

func TestItemsJob_Execute(t *testing.T) {
Expand Down
3 changes: 2 additions & 1 deletion internal/infra/sqlite/feed/feed.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@ import (
"database/sql"
"time"

"github.com/cubny/lite-reader/internal/app/feed"
_ "github.com/mattn/go-sqlite3"

"github.com/cubny/lite-reader/internal/app/feed"
)

type DB struct {
Expand Down
3 changes: 2 additions & 1 deletion internal/infra/sqlite/item/item.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ package item

import (
"database/sql"
_ "github.com/mattn/go-sqlite3"
"time"

_ "github.com/mattn/go-sqlite3"

"github.com/cubny/lite-reader/internal/app/item"
)

Expand Down
3 changes: 2 additions & 1 deletion internal/mocks/app/feed/repo_mock.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion internal/mocks/app/item/repo_mock.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion internal/mocks/infra/http/api/feed_mock.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion internal/mocks/infra/http/api/item_mock.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion internal/mocks/infra/job/dependencies_mock.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 0ea5184

Please sign in to comment.