Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

all: rename module #11

Merged
merged 1 commit into from
May 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmd/serve.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ package cmd

import (
"go/types"
"wallet-backend/internal/serve"

_ "github.com/lib/pq"
"github.com/spf13/cobra"
"github.com/stellar/go/support/config"
supportlog "github.com/stellar/go/support/log"
"github.com/stellar/wallet-backend/internal/serve"
)

type serveCmd struct {
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 wallet-backend
module github.com/stellar/wallet-backend

go 1.22.0

Expand Down
3 changes: 2 additions & 1 deletion internal/data/models.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ package data

import (
"errors"
"wallet-backend/internal/db"

"github.com/stellar/wallet-backend/internal/db"
)

type Models struct {
Expand Down
2 changes: 1 addition & 1 deletion internal/data/payments.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ package data

import (
"context"
"wallet-backend/internal/db"

"github.com/stellar/go/support/errors"
"github.com/stellar/wallet-backend/internal/db"
)

type PaymentModel struct {
Expand Down
4 changes: 2 additions & 2 deletions internal/data/payments_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ import (
"context"
"database/sql"
"testing"
"wallet-backend/internal/db"
"wallet-backend/internal/db/dbtest"

"github.com/stellar/go/keypair"
"github.com/stellar/wallet-backend/internal/db"
"github.com/stellar/wallet-backend/internal/db/dbtest"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
Expand Down
2 changes: 1 addition & 1 deletion internal/db/dbtest/dbtest.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ package dbtest
import (
"net/http"
"testing"
"wallet-backend/internal/db/migrations"

migrate "github.com/rubenv/sql-migrate"
"github.com/stellar/go/support/db/dbtest"
"github.com/stellar/go/support/db/schema"
"github.com/stellar/wallet-backend/internal/db/migrations"
)

func Open(t *testing.T) *dbtest.DB {
Expand Down
4 changes: 2 additions & 2 deletions internal/serve/httphandler/payments_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ package httphandler

import (
"net/http"
"wallet-backend/internal/data"
"wallet-backend/internal/serve/httperror"

"github.com/stellar/go/support/http/httpdecode"
"github.com/stellar/wallet-backend/internal/data"
"github.com/stellar/wallet-backend/internal/serve/httperror"
)

type PaymentsHandler struct {
Expand Down
7 changes: 3 additions & 4 deletions internal/serve/httphandler/payments_handler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,12 @@ import (
"net/http/httptest"
"strings"
"testing"
"wallet-backend/internal/data"
"wallet-backend/internal/db/dbtest"

"wallet-backend/internal/db"

"github.com/go-chi/chi"
"github.com/stellar/go/keypair"
"github.com/stellar/wallet-backend/internal/data"
"github.com/stellar/wallet-backend/internal/db"
"github.com/stellar/wallet-backend/internal/db/dbtest"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
Expand Down
9 changes: 4 additions & 5 deletions internal/serve/serve.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,15 @@ import (
"fmt"
"net/http"

"wallet-backend/internal/data"
"wallet-backend/internal/db"
"wallet-backend/internal/serve/httperror"
"wallet-backend/internal/serve/httphandler"

"github.com/go-chi/chi"
"github.com/pkg/errors"
supporthttp "github.com/stellar/go/support/http"
supportlog "github.com/stellar/go/support/log"
"github.com/stellar/go/support/render/health"
"github.com/stellar/wallet-backend/internal/data"
"github.com/stellar/wallet-backend/internal/db"
"github.com/stellar/wallet-backend/internal/serve/httperror"
"github.com/stellar/wallet-backend/internal/serve/httphandler"
)

type Configs struct {
Expand Down
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package main

import "wallet-backend/cmd"
import "github.com/stellar/wallet-backend/cmd"

func main() {
cmd.Execute()
Expand Down