diff --git a/.golangci.yaml b/.golangci.yaml index a91d058..e8446eb 100644 --- a/.golangci.yaml +++ b/.golangci.yaml @@ -61,6 +61,7 @@ linters-settings: - Standard - Default - Prefix(github.com/riverqueue) + - Prefix(riverqueue.com/riverui) gomoddirectives: replace-local: true diff --git a/cmd/riverui/main.go b/cmd/riverui/main.go index 445d424..aa7e069 100644 --- a/cmd/riverui/main.go +++ b/cmd/riverui/main.go @@ -18,7 +18,8 @@ import ( "github.com/riverqueue/river" "github.com/riverqueue/river/riverdriver/riverpgxv5" - "github.com/riverqueue/riverui" + + "riverqueue.com/riverui" ) var logger *slog.Logger //nolint:gochecknoglobals diff --git a/go.mod b/go.mod index f2f5c90..425b76c 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/riverqueue/riverui +module riverqueue.com/riverui go 1.22 diff --git a/handler.go b/handler.go index 53ea831..79ecd28 100644 --- a/handler.go +++ b/handler.go @@ -21,9 +21,10 @@ import ( "github.com/riverqueue/river/rivershared/startstop" "github.com/riverqueue/river/rivershared/util/randutil" "github.com/riverqueue/river/rivershared/util/valutil" - "github.com/riverqueue/riverui/internal/apiendpoint" - "github.com/riverqueue/riverui/internal/apimiddleware" - "github.com/riverqueue/riverui/internal/dbsqlc" + + "riverqueue.com/riverui/internal/apiendpoint" + "riverqueue.com/riverui/internal/apimiddleware" + "riverqueue.com/riverui/internal/dbsqlc" ) type DBTXWithBegin interface { diff --git a/handler_api_endpoint.go b/handler_api_endpoint.go index ecf893a..3b5adc2 100644 --- a/handler_api_endpoint.go +++ b/handler_api_endpoint.go @@ -19,11 +19,12 @@ import ( "github.com/riverqueue/river/rivershared/util/ptrutil" "github.com/riverqueue/river/rivershared/util/sliceutil" "github.com/riverqueue/river/rivertype" - "github.com/riverqueue/riverui/internal/apiendpoint" - "github.com/riverqueue/riverui/internal/apierror" - "github.com/riverqueue/riverui/internal/dbsqlc" - "github.com/riverqueue/riverui/internal/querycacher" - "github.com/riverqueue/riverui/internal/util/pgxutil" + + "riverqueue.com/riverui/internal/apiendpoint" + "riverqueue.com/riverui/internal/apierror" + "riverqueue.com/riverui/internal/dbsqlc" + "riverqueue.com/riverui/internal/querycacher" + "riverqueue.com/riverui/internal/util/pgxutil" ) // A bundle of common utilities needed for many API endpoints. diff --git a/handler_api_endpoint_test.go b/handler_api_endpoint_test.go index d633f16..ebc70d6 100644 --- a/handler_api_endpoint_test.go +++ b/handler_api_endpoint_test.go @@ -16,9 +16,10 @@ import ( "github.com/riverqueue/river/rivershared/startstop" "github.com/riverqueue/river/rivershared/util/ptrutil" "github.com/riverqueue/river/rivertype" - "github.com/riverqueue/riverui/internal/apierror" - "github.com/riverqueue/riverui/internal/riverinternaltest" - "github.com/riverqueue/riverui/internal/riverinternaltest/testfactory" + + "riverqueue.com/riverui/internal/apierror" + "riverqueue.com/riverui/internal/riverinternaltest" + "riverqueue.com/riverui/internal/riverinternaltest/testfactory" ) type setupEndpointTestBundle struct { diff --git a/handler_test.go b/handler_test.go index eef3d48..b905b3e 100644 --- a/handler_test.go +++ b/handler_test.go @@ -14,8 +14,9 @@ import ( "github.com/stretchr/testify/require" "github.com/riverqueue/river/rivershared/util/ptrutil" - "github.com/riverqueue/riverui/internal/riverinternaltest" - "github.com/riverqueue/riverui/internal/riverinternaltest/testfactory" + + "riverqueue.com/riverui/internal/riverinternaltest" + "riverqueue.com/riverui/internal/riverinternaltest/testfactory" ) func TestNewHandlerIntegration(t *testing.T) { diff --git a/internal/apiendpoint/api_endpoint.go b/internal/apiendpoint/api_endpoint.go index e3f1b32..222ca94 100644 --- a/internal/apiendpoint/api_endpoint.go +++ b/internal/apiendpoint/api_endpoint.go @@ -15,8 +15,8 @@ import ( "github.com/jackc/pgerrcode" "github.com/jackc/pgx/v5/pgconn" - "github.com/riverqueue/riverui/internal/apierror" - "github.com/riverqueue/riverui/internal/validate" + "riverqueue.com/riverui/internal/apierror" + "riverqueue.com/riverui/internal/validate" ) // Endpoint is a struct that should be embedded on an API endpoint, and which diff --git a/internal/apiendpoint/api_endpoint_test.go b/internal/apiendpoint/api_endpoint_test.go index 324e6a2..5d781b9 100644 --- a/internal/apiendpoint/api_endpoint_test.go +++ b/internal/apiendpoint/api_endpoint_test.go @@ -15,8 +15,8 @@ import ( "github.com/jackc/pgx/v5/pgconn" "github.com/stretchr/testify/require" - "github.com/riverqueue/riverui/internal/apierror" - "github.com/riverqueue/riverui/internal/riverinternaltest" + "riverqueue.com/riverui/internal/apierror" + "riverqueue.com/riverui/internal/riverinternaltest" ) func TestMountAndServe(t *testing.T) { diff --git a/internal/apierror/api_error_test.go b/internal/apierror/api_error_test.go index 6947d75..1ff4ba7 100644 --- a/internal/apierror/api_error_test.go +++ b/internal/apierror/api_error_test.go @@ -9,7 +9,7 @@ import ( "github.com/stretchr/testify/require" - "github.com/riverqueue/riverui/internal/riverinternaltest" + "riverqueue.com/riverui/internal/riverinternaltest" ) func TestAPIError(t *testing.T) { diff --git a/internal/querycacher/query_cacher.go b/internal/querycacher/query_cacher.go index 812aaba..8e555bc 100644 --- a/internal/querycacher/query_cacher.go +++ b/internal/querycacher/query_cacher.go @@ -8,7 +8,8 @@ import ( "github.com/riverqueue/river/rivershared/baseservice" "github.com/riverqueue/river/rivershared/startstop" - "github.com/riverqueue/riverui/internal/dbsqlc" + + "riverqueue.com/riverui/internal/dbsqlc" ) // QueryCacher executes a database query periodically and caches the result. The @@ -131,7 +132,7 @@ func (s *QueryCacher[TRes]) Start(ctx context.Context) error { // // So this: // -// QueryCacher[[]*github.com/riverqueue/riverui/internal/dbsqlc.JobCountByStateRow] +// QueryCacher[[]*riverqueue.com/riverui/internal/dbsqlc.JobCountByStateRow] // // Becomes this: // diff --git a/internal/querycacher/query_cacher_test.go b/internal/querycacher/query_cacher_test.go index d7459df..7f2d66f 100644 --- a/internal/querycacher/query_cacher_test.go +++ b/internal/querycacher/query_cacher_test.go @@ -11,9 +11,10 @@ import ( "github.com/riverqueue/river/riverdriver/riverpgxv5" "github.com/riverqueue/river/rivershared/riversharedtest" "github.com/riverqueue/river/rivershared/startstoptest" - "github.com/riverqueue/riverui/internal/dbsqlc" - "github.com/riverqueue/riverui/internal/riverinternaltest" - "github.com/riverqueue/riverui/internal/riverinternaltest/testfactory" + + "riverqueue.com/riverui/internal/dbsqlc" + "riverqueue.com/riverui/internal/riverinternaltest" + "riverqueue.com/riverui/internal/riverinternaltest/testfactory" ) func TestQueryCacher(t *testing.T) { @@ -118,8 +119,8 @@ func TestSimplifyArchetypeLogName(t *testing.T) { require.Equal(t, "Simple[[]*int]", simplifyArchetypeLogName("Simple[[]*int]")) // More realistic examples. - require.Equal(t, "QueryCacher[dbsqlc.JobCountByStateRow]", simplifyArchetypeLogName("QueryCacher[github.com/riverqueue/riverui/internal/dbsqlc.JobCountByStateRow]")) - require.Equal(t, "QueryCacher[*dbsqlc.JobCountByStateRow]", simplifyArchetypeLogName("QueryCacher[*github.com/riverqueue/riverui/internal/dbsqlc.JobCountByStateRow]")) - require.Equal(t, "QueryCacher[[]dbsqlc.JobCountByStateRow]", simplifyArchetypeLogName("QueryCacher[[]github.com/riverqueue/riverui/internal/dbsqlc.JobCountByStateRow]")) - require.Equal(t, "QueryCacher[[]*dbsqlc.JobCountByStateRow]", simplifyArchetypeLogName("QueryCacher[[]*github.com/riverqueue/riverui/internal/dbsqlc.JobCountByStateRow]")) + require.Equal(t, "QueryCacher[dbsqlc.JobCountByStateRow]", simplifyArchetypeLogName("QueryCacher[riverqueue.com/riverui/internal/dbsqlc.JobCountByStateRow]")) + require.Equal(t, "QueryCacher[*dbsqlc.JobCountByStateRow]", simplifyArchetypeLogName("QueryCacher[*riverqueue.com/riverui/internal/dbsqlc.JobCountByStateRow]")) + require.Equal(t, "QueryCacher[[]dbsqlc.JobCountByStateRow]", simplifyArchetypeLogName("QueryCacher[[]riverqueue.com/riverui/internal/dbsqlc.JobCountByStateRow]")) + require.Equal(t, "QueryCacher[[]*dbsqlc.JobCountByStateRow]", simplifyArchetypeLogName("QueryCacher[[]*riverqueue.com/riverui/internal/dbsqlc.JobCountByStateRow]")) } diff --git a/internal/util/pgxutil/db_util_test.go b/internal/util/pgxutil/db_util_test.go index 648ea37..571b4d1 100644 --- a/internal/util/pgxutil/db_util_test.go +++ b/internal/util/pgxutil/db_util_test.go @@ -7,7 +7,7 @@ import ( "github.com/jackc/pgx/v5" "github.com/stretchr/testify/require" - "github.com/riverqueue/riverui/internal/riverinternaltest" + "riverqueue.com/riverui/internal/riverinternaltest" ) func TestWithTx(t *testing.T) {