Skip to content

Commit

Permalink
feat!: Change the module name to "URL based"
Browse files Browse the repository at this point in the history
This make me easier to test the module with external services.
  • Loading branch information
ditatompel committed Jul 6, 2024
1 parent be43734 commit 4c7d535
Show file tree
Hide file tree
Showing 19 changed files with 41 additions and 29 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
goarch: ${{ matrix.goarch }}
overwrite: true
pre_command: export CGO_ENABLED=0
ldflags: -s -w -X xmr-remote-nodes/internal/config.Version=${{github.ref_name}}
ldflags: -s -w -X github.com/ditatompel/xmr-remote-nodes/internal/config.Version=${{github.ref_name}}
build_flags: -tags server
project_path: .
binary_name: server
Expand All @@ -53,7 +53,7 @@ jobs:
goarch: ${{ matrix.goarch }}
overwrite: true
pre_command: export CGO_ENABLED=0
ldflags: -s -w -X xmr-remote-nodes/internal/config.Version=${{github.ref_name}}
ldflags: -s -w -X github.com/ditatompel/xmr-remote-nodes/internal/config.Version=${{github.ref_name}}
binary_name: client
project_path: .
extra_files: LICENSE README.md
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ ifdef RELEASE_TAG
endif
# end modified rclone's Makefile

BUILD_LDFLAGS := -s -w -X xmr-remote-nodes/internal/config.Version=$(TAG)
BUILD_LDFLAGS := -s -w -X github.com/ditatompel/xmr-remote-nodes/internal/config.Version=$(TAG)

# This called from air cmd (see .air.toml)
.PHONY: dev
Expand Down
5 changes: 3 additions & 2 deletions cmd/client/probe.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ import (
"net/http"
"os"
"time"
"xmr-remote-nodes/internal/config"
"xmr-remote-nodes/internal/monero"

"github.com/ditatompel/xmr-remote-nodes/internal/config"
"github.com/ditatompel/xmr-remote-nodes/internal/monero"

"github.com/spf13/cobra"
"golang.org/x/net/proxy"
Expand Down
5 changes: 3 additions & 2 deletions cmd/cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ package cmd

import (
"os"
"xmr-remote-nodes/cmd/client"
"xmr-remote-nodes/internal/config"

"github.com/ditatompel/xmr-remote-nodes/cmd/client"
"github.com/ditatompel/xmr-remote-nodes/internal/config"

"github.com/spf13/cobra"
)
Expand Down
5 changes: 3 additions & 2 deletions cmd/server/cron.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ import (
"os"
"text/tabwriter"
"time"
"xmr-remote-nodes/internal/cron"
"xmr-remote-nodes/internal/database"

"github.com/ditatompel/xmr-remote-nodes/internal/cron"
"github.com/ditatompel/xmr-remote-nodes/internal/database"

"github.com/spf13/cobra"
)
Expand Down
2 changes: 1 addition & 1 deletion cmd/server/init.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package server

import "xmr-remote-nodes/cmd"
import "github.com/ditatompel/xmr-remote-nodes/cmd"

func init() {
cmd.Root.AddCommand(serveCmd)
Expand Down
5 changes: 3 additions & 2 deletions cmd/server/probers.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ import (
"strings"
"text/tabwriter"
"time"
"xmr-remote-nodes/internal/database"
"xmr-remote-nodes/internal/monero"

"github.com/ditatompel/xmr-remote-nodes/internal/database"
"github.com/ditatompel/xmr-remote-nodes/internal/monero"

"github.com/spf13/cobra"
)
Expand Down
11 changes: 6 additions & 5 deletions cmd/server/serve.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,12 @@ import (
"os/signal"
"syscall"
"time"
"xmr-remote-nodes/frontend"
"xmr-remote-nodes/handler"
"xmr-remote-nodes/internal/config"
"xmr-remote-nodes/internal/cron"
"xmr-remote-nodes/internal/database"

"github.com/ditatompel/xmr-remote-nodes/frontend"
"github.com/ditatompel/xmr-remote-nodes/handler"
"github.com/ditatompel/xmr-remote-nodes/internal/config"
"github.com/ditatompel/xmr-remote-nodes/internal/cron"
"github.com/ditatompel/xmr-remote-nodes/internal/database"

"github.com/gofiber/fiber/v2"
"github.com/gofiber/fiber/v2/middleware/cors"
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 xmr-remote-nodes
module github.com/ditatompel/xmr-remote-nodes

go 1.22.2

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

import (
"xmr-remote-nodes/internal/monero"
"github.com/ditatompel/xmr-remote-nodes/internal/monero"

"github.com/gofiber/fiber/v2"
)
Expand Down
3 changes: 2 additions & 1 deletion handler/response.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ package handler

import (
"strconv"
"xmr-remote-nodes/internal/monero"

"github.com/ditatompel/xmr-remote-nodes/internal/monero"

"github.com/gofiber/fiber/v2"
)
Expand Down
3 changes: 2 additions & 1 deletion internal/cron/cron.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ import (
"log/slog"
"math"
"time"
"xmr-remote-nodes/internal/database"

"github.com/ditatompel/xmr-remote-nodes/internal/database"
)

type CronRepository interface {
Expand Down
3 changes: 2 additions & 1 deletion internal/database/mysql.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ package database

import (
"fmt"
"xmr-remote-nodes/internal/config"

"github.com/ditatompel/xmr-remote-nodes/internal/config"

_ "github.com/go-sql-driver/mysql"
"github.com/jmoiron/sqlx"
Expand Down
3 changes: 2 additions & 1 deletion internal/monero/monero.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ import (
"slices"
"strings"
"time"
"xmr-remote-nodes/internal/database"

"github.com/ditatompel/xmr-remote-nodes/internal/database"

"github.com/jmoiron/sqlx/types"
)
Expand Down
5 changes: 3 additions & 2 deletions internal/monero/monero_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ import (
"reflect"
"strconv"
"testing"
"xmr-remote-nodes/internal/config"
"xmr-remote-nodes/internal/database"

"github.com/ditatompel/xmr-remote-nodes/internal/config"
"github.com/ditatompel/xmr-remote-nodes/internal/database"
)

var testMySQL = true
Expand Down
3 changes: 2 additions & 1 deletion internal/monero/prober.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ import (
"fmt"
"slices"
"strings"
"xmr-remote-nodes/internal/database"

"github.com/ditatompel/xmr-remote-nodes/internal/database"

"github.com/google/uuid"
)
Expand Down
3 changes: 2 additions & 1 deletion internal/monero/report.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ import (
"slices"
"strings"
"time"
"xmr-remote-nodes/internal/geo"

"github.com/ditatompel/xmr-remote-nodes/internal/geo"
)

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

import (
"xmr-remote-nodes/cmd"
"github.com/ditatompel/xmr-remote-nodes/cmd"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion server.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

package main

import _ "xmr-remote-nodes/cmd/server"
import _ "github.com/ditatompel/xmr-remote-nodes/cmd/server"

0 comments on commit 4c7d535

Please sign in to comment.