diff --git a/README.md b/README.md index 9b3905b2..25fe584d 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,8 @@ [![GoDoc][1]][2] [![Build Status][7]][8] [![Codecov][9]][10] [![Release][5]][6] [![license-Apache 2][3]][4] -[1]: https://godoc.org/github.com/go-spring-projects/go-spring?status.svg -[2]: https://godoc.org/github.com/go-spring-projects/go-spring +[1]: https://godoc.org/go-spring.dev/spring?status.svg +[2]: https://godoc.org/go-spring.dev/spring [3]: https://img.shields.io/badge/license-Apache%202-blue.svg [4]: LICENSE [5]: https://img.shields.io/github/v/release/go-spring-projects/go-spring?color=orange @@ -22,7 +22,7 @@ This project initial code based from [go-spring/go-spring](https://github.com/go English | [中文](README_CN.md) ### Install -`go get github.com/go-spring-projects/go-spring@latest` +`go get go-spring.dev/spring@latest` ### Features * **IoC Container**: Implements an inversion of control (IoC) container based on reflection, supporting the injection of structs, functions, and constants. This means you can use the `autowired` tag to automatically inject dependencies without having to manage them manually. @@ -69,7 +69,7 @@ import ( "context" "log/slog" - "github.com/go-spring-projects/go-spring/gs" + "go-spring.dev/spring/gs" ) type MyApp struct { @@ -98,7 +98,7 @@ func main() { ```go package mypkg -import "github.com/go-spring-projects/go-spring/gs" +import "go-spring.dev/spring/gs" type MyApp struct {} @@ -209,8 +209,8 @@ import ( "fmt" "log/slog" - "github.com/go-spring-projects/go-spring/conf" - "github.com/go-spring-projects/go-spring/gs" + "go-spring.dev/spring/conf" + "go-spring.dev/spring/gs" "gopkg.in/validator.v2" ) @@ -287,8 +287,8 @@ import ( "log/slog" "net/http" - "github.com/go-spring-projects/go-spring/dync" - "github.com/go-spring-projects/go-spring/gs" + "go-spring.dev/spring/dync" + "go-spring.dev/spring/gs" ) type Handler struct { @@ -373,7 +373,7 @@ import ( "os" "strings" - "github.com/go-spring-projects/go-spring/gs" + "go-spring.dev/spring/gs" ) func init() { @@ -531,8 +531,8 @@ import ( "os" "strings" - "github.com/go-spring-projects/go-spring/gs" "github.com/urfave/cli/v2" + "go-spring.dev/spring/gs" ) //import _ "testapp/pkg/infra" diff --git a/README_CN.md b/README_CN.md index 49075113..4f27125c 100644 --- a/README_CN.md +++ b/README_CN.md @@ -2,8 +2,8 @@ [![GoDoc][1]][2] [![Build Status][7]][8] [![Codecov][9]][10] [![Release][5]][6] [![license-Apache 2][3]][4] -[1]: https://godoc.org/github.com/go-spring-projects/go-spring?status.svg -[2]: https://godoc.org/github.com/go-spring-projects/go-spring +[1]: https://godoc.org/go-spring.dev/spring?status.svg +[2]: https://godoc.org/go-spring.dev/spring [3]: https://img.shields.io/badge/license-Apache%202-blue.svg [4]: LICENSE [5]: https://img.shields.io/github/v/release/go-spring-projects/go-spring?color=orange @@ -22,7 +22,7 @@ [English](README.md) | 中文 ### 安装 -`go get github.com/go-spring-projects/go-spring@latest` +`go get go-spring.dev/spring@latest` ### 主要特性 * **IoC容器**: 实现了基于反射的控制反转(IoC)容器,支持结构体、函数和常量的注入。这意味着你可以使用`autowired`标签来自动注入依赖,而不必手动管理它们。 @@ -69,7 +69,7 @@ import ( "context" "log/slog" - "github.com/go-spring-projects/go-spring/gs" + "go-spring.dev/spring/gs" ) type MyApp struct { @@ -98,7 +98,7 @@ func main() { ```go package mypkg -import "github.com/go-spring-projects/go-spring/gs" +import "go-spring.dev/spring/gs" type MyApp struct {} @@ -208,8 +208,8 @@ import ( "fmt" "log/slog" - "github.com/go-spring-projects/go-spring/conf" - "github.com/go-spring-projects/go-spring/gs" + "go-spring.dev/spring/conf" + "go-spring.dev/spring/gs" "gopkg.in/validator.v2" ) @@ -286,8 +286,8 @@ import ( "log/slog" "net/http" - "github.com/go-spring-projects/go-spring/dync" - "github.com/go-spring-projects/go-spring/gs" + "go-spring.dev/spring/dync" + "go-spring.dev/spring/gs" ) type Handler struct { @@ -372,7 +372,7 @@ import ( "os" "strings" - "github.com/go-spring-projects/go-spring/gs" + "go-spring.dev/spring/gs" ) func init() { @@ -530,7 +530,7 @@ import ( "os" "strings" - "github.com/go-spring-projects/go-spring/gs" + "go-spring.dev/spring/gs" "github.com/urfave/cli/v2" ) diff --git a/conf/bind.go b/conf/bind.go index a3d15f42..025906fa 100644 --- a/conf/bind.go +++ b/conf/bind.go @@ -23,7 +23,7 @@ import ( "strconv" "strings" - "github.com/go-spring-projects/go-spring/internal/utils" + "go-spring.dev/spring/internal/utils" ) var ( diff --git a/conf/bind_test.go b/conf/bind_test.go index 52d41040..358ad349 100644 --- a/conf/bind_test.go +++ b/conf/bind_test.go @@ -24,7 +24,7 @@ import ( "testing" "time" - "github.com/go-spring-projects/go-spring/internal/utils/assert" + "go-spring.dev/spring/internal/utils/assert" ) type Point struct { diff --git a/conf/conf.go b/conf/conf.go index f9112cf9..178c2e66 100644 --- a/conf/conf.go +++ b/conf/conf.go @@ -28,12 +28,12 @@ import ( "strings" "time" - "github.com/go-spring-projects/go-spring/conf/internal" - "github.com/go-spring-projects/go-spring/conf/prop" - "github.com/go-spring-projects/go-spring/conf/toml" - "github.com/go-spring-projects/go-spring/conf/yaml" - "github.com/go-spring-projects/go-spring/internal/utils" "github.com/spf13/cast" + "go-spring.dev/spring/conf/internal" + "go-spring.dev/spring/conf/prop" + "go-spring.dev/spring/conf/toml" + "go-spring.dev/spring/conf/yaml" + "go-spring.dev/spring/internal/utils" ) // Splitter splits string into []string by some characters. diff --git a/conf/conf_test.go b/conf/conf_test.go index c6c42d8d..29a7fca2 100644 --- a/conf/conf_test.go +++ b/conf/conf_test.go @@ -19,7 +19,7 @@ package conf import ( "testing" - "github.com/go-spring-projects/go-spring/internal/utils/assert" + "go-spring.dev/spring/internal/utils/assert" ) func TestRegisterConverter(t *testing.T) { diff --git a/conf/flat_test.go b/conf/flat_test.go index 14973484..8a5e193e 100644 --- a/conf/flat_test.go +++ b/conf/flat_test.go @@ -19,7 +19,7 @@ package conf import ( "testing" - "github.com/go-spring-projects/go-spring/internal/utils/assert" + "go-spring.dev/spring/internal/utils/assert" ) func TestFlatten(t *testing.T) { diff --git a/conf/internal/path_test.go b/conf/internal/path_test.go index 4adc7756..a28f0f44 100644 --- a/conf/internal/path_test.go +++ b/conf/internal/path_test.go @@ -21,7 +21,7 @@ import ( "fmt" "testing" - "github.com/go-spring-projects/go-spring/internal/utils/assert" + "go-spring.dev/spring/internal/utils/assert" ) func TestSplitPath(t *testing.T) { diff --git a/conf/internal/storage.go b/conf/internal/storage.go index 494b7806..c34dc2de 100644 --- a/conf/internal/storage.go +++ b/conf/internal/storage.go @@ -20,7 +20,7 @@ import ( "fmt" "sort" - "github.com/go-spring-projects/go-spring/internal/utils" + "go-spring.dev/spring/internal/utils" ) type nodeType int diff --git a/conf/internal/storage_test.go b/conf/internal/storage_test.go index a092c5d3..6ec986b5 100644 --- a/conf/internal/storage_test.go +++ b/conf/internal/storage_test.go @@ -19,7 +19,7 @@ package internal import ( "testing" - "github.com/go-spring-projects/go-spring/internal/utils/assert" + "go-spring.dev/spring/internal/utils/assert" ) func TestStorage(t *testing.T) { diff --git a/conf/prop/prop_test.go b/conf/prop/prop_test.go index 62a3c370..c8a96308 100644 --- a/conf/prop/prop_test.go +++ b/conf/prop/prop_test.go @@ -19,7 +19,7 @@ package prop import ( "testing" - "github.com/go-spring-projects/go-spring/internal/utils/assert" + "go-spring.dev/spring/internal/utils/assert" ) func TestRead(t *testing.T) { diff --git a/conf/toml/toml_test.go b/conf/toml/toml_test.go index a30f9fdc..7588e344 100644 --- a/conf/toml/toml_test.go +++ b/conf/toml/toml_test.go @@ -19,7 +19,7 @@ package toml import ( "testing" - "github.com/go-spring-projects/go-spring/internal/utils/assert" + "go-spring.dev/spring/internal/utils/assert" ) func TestRead(t *testing.T) { diff --git a/conf/validate_test.go b/conf/validate_test.go index 64d6881f..c7e85923 100644 --- a/conf/validate_test.go +++ b/conf/validate_test.go @@ -19,7 +19,7 @@ package conf import ( "testing" - "github.com/go-spring-projects/go-spring/internal/utils/assert" + "go-spring.dev/spring/internal/utils/assert" ) var empty = &emptyValidator{} diff --git a/conf/yaml/yaml_test.go b/conf/yaml/yaml_test.go index 0332e325..2ccac46f 100644 --- a/conf/yaml/yaml_test.go +++ b/conf/yaml/yaml_test.go @@ -20,7 +20,7 @@ import ( "strings" "testing" - "github.com/go-spring-projects/go-spring/internal/utils/assert" + "go-spring.dev/spring/internal/utils/assert" ) func TestRead(t *testing.T) { diff --git a/dync/array.go b/dync/array.go index fa820911..6b58f1ce 100644 --- a/dync/array.go +++ b/dync/array.go @@ -20,7 +20,7 @@ import ( "encoding/json" "sync/atomic" - "github.com/go-spring-projects/go-spring/conf" + "go-spring.dev/spring/conf" ) var _ conf.Value = (*Array[any])(nil) diff --git a/dync/array_test.go b/dync/array_test.go index c3ffe1e2..388eaa91 100644 --- a/dync/array_test.go +++ b/dync/array_test.go @@ -4,8 +4,8 @@ import ( "encoding/json" "testing" - "github.com/go-spring-projects/go-spring/conf" - "github.com/go-spring-projects/go-spring/internal/utils/assert" + "go-spring.dev/spring/conf" + "go-spring.dev/spring/internal/utils/assert" ) func TestArray(t *testing.T) { diff --git a/dync/bool.go b/dync/bool.go index c01a2db1..eaa22e2b 100644 --- a/dync/bool.go +++ b/dync/bool.go @@ -20,7 +20,7 @@ import ( "encoding/json" "sync/atomic" - "github.com/go-spring-projects/go-spring/conf" + "go-spring.dev/spring/conf" ) var _ conf.Value = (*Bool)(nil) diff --git a/dync/bool_test.go b/dync/bool_test.go index b9ed7121..ebfeb89b 100644 --- a/dync/bool_test.go +++ b/dync/bool_test.go @@ -20,8 +20,8 @@ import ( "encoding/json" "testing" - "github.com/go-spring-projects/go-spring/conf" - "github.com/go-spring-projects/go-spring/internal/utils/assert" + "go-spring.dev/spring/conf" + "go-spring.dev/spring/internal/utils/assert" ) func TestBool(t *testing.T) { diff --git a/dync/duration.go b/dync/duration.go index 3ee97472..e28cf6aa 100644 --- a/dync/duration.go +++ b/dync/duration.go @@ -21,7 +21,7 @@ import ( "sync/atomic" "time" - "github.com/go-spring-projects/go-spring/conf" + "go-spring.dev/spring/conf" ) var _ conf.Value = (*Duration)(nil) diff --git a/dync/duration_test.go b/dync/duration_test.go index 27bfb98f..2db1faa2 100644 --- a/dync/duration_test.go +++ b/dync/duration_test.go @@ -21,8 +21,8 @@ import ( "testing" "time" - "github.com/go-spring-projects/go-spring/conf" - "github.com/go-spring-projects/go-spring/internal/utils/assert" + "go-spring.dev/spring/conf" + "go-spring.dev/spring/internal/utils/assert" ) func TestDuration(t *testing.T) { diff --git a/dync/dync.go b/dync/dync.go index e54b74bf..d8e981ad 100644 --- a/dync/dync.go +++ b/dync/dync.go @@ -23,8 +23,8 @@ import ( "strings" "sync/atomic" - "github.com/go-spring-projects/go-spring/conf" - "github.com/go-spring-projects/go-spring/internal/utils" + "go-spring.dev/spring/conf" + "go-spring.dev/spring/internal/utils" ) // A Field represents a refreshable struct field. diff --git a/dync/dync_test.go b/dync/dync_test.go index 491ad1a0..929b3509 100644 --- a/dync/dync_test.go +++ b/dync/dync_test.go @@ -21,8 +21,8 @@ import ( "reflect" "testing" - "github.com/go-spring-projects/go-spring/conf" - "github.com/go-spring-projects/go-spring/internal/utils/assert" + "go-spring.dev/spring/conf" + "go-spring.dev/spring/internal/utils/assert" ) func TestProperties(t *testing.T) { diff --git a/dync/float32.go b/dync/float32.go index fecefc00..5304f2fc 100644 --- a/dync/float32.go +++ b/dync/float32.go @@ -21,7 +21,7 @@ import ( "math" "sync/atomic" - "github.com/go-spring-projects/go-spring/conf" + "go-spring.dev/spring/conf" ) var _ conf.Value = (*Float32)(nil) diff --git a/dync/float32_test.go b/dync/float32_test.go index 327910e1..ded8560c 100644 --- a/dync/float32_test.go +++ b/dync/float32_test.go @@ -20,8 +20,8 @@ import ( "encoding/json" "testing" - "github.com/go-spring-projects/go-spring/conf" - "github.com/go-spring-projects/go-spring/internal/utils/assert" + "go-spring.dev/spring/conf" + "go-spring.dev/spring/internal/utils/assert" ) func TestFloat32(t *testing.T) { diff --git a/dync/float64.go b/dync/float64.go index 62f60762..9c53606c 100644 --- a/dync/float64.go +++ b/dync/float64.go @@ -21,7 +21,7 @@ import ( "math" "sync/atomic" - "github.com/go-spring-projects/go-spring/conf" + "go-spring.dev/spring/conf" ) var _ conf.Value = (*Float64)(nil) diff --git a/dync/float64_test.go b/dync/float64_test.go index 3156edbd..c64726ed 100644 --- a/dync/float64_test.go +++ b/dync/float64_test.go @@ -20,8 +20,8 @@ import ( "encoding/json" "testing" - "github.com/go-spring-projects/go-spring/conf" - "github.com/go-spring-projects/go-spring/internal/utils/assert" + "go-spring.dev/spring/conf" + "go-spring.dev/spring/internal/utils/assert" ) func TestFloat64(t *testing.T) { diff --git a/dync/int32.go b/dync/int32.go index 15f6c12e..0847eb5f 100644 --- a/dync/int32.go +++ b/dync/int32.go @@ -20,7 +20,7 @@ import ( "encoding/json" "sync/atomic" - "github.com/go-spring-projects/go-spring/conf" + "go-spring.dev/spring/conf" ) var _ conf.Value = (*Int32)(nil) diff --git a/dync/int32_test.go b/dync/int32_test.go index 660049fb..adc9331a 100644 --- a/dync/int32_test.go +++ b/dync/int32_test.go @@ -20,8 +20,8 @@ import ( "encoding/json" "testing" - "github.com/go-spring-projects/go-spring/conf" - "github.com/go-spring-projects/go-spring/internal/utils/assert" + "go-spring.dev/spring/conf" + "go-spring.dev/spring/internal/utils/assert" ) func TestInt32(t *testing.T) { diff --git a/dync/int64.go b/dync/int64.go index c38a65d6..bf5d4b0d 100644 --- a/dync/int64.go +++ b/dync/int64.go @@ -20,7 +20,7 @@ import ( "encoding/json" "sync/atomic" - "github.com/go-spring-projects/go-spring/conf" + "go-spring.dev/spring/conf" ) var _ conf.Value = (*Int64)(nil) diff --git a/dync/int64_test.go b/dync/int64_test.go index 7ef304ad..8e02ea4a 100644 --- a/dync/int64_test.go +++ b/dync/int64_test.go @@ -20,8 +20,8 @@ import ( "encoding/json" "testing" - "github.com/go-spring-projects/go-spring/conf" - "github.com/go-spring-projects/go-spring/internal/utils/assert" + "go-spring.dev/spring/conf" + "go-spring.dev/spring/internal/utils/assert" ) func TestInt64(t *testing.T) { diff --git a/dync/map.go b/dync/map.go index 5c47803d..4bae919d 100644 --- a/dync/map.go +++ b/dync/map.go @@ -20,7 +20,7 @@ import ( "encoding/json" "sync/atomic" - "github.com/go-spring-projects/go-spring/conf" + "go-spring.dev/spring/conf" ) var _ conf.Value = (*Map[int, any])(nil) diff --git a/dync/map_test.go b/dync/map_test.go index 66a299af..74a741c7 100644 --- a/dync/map_test.go +++ b/dync/map_test.go @@ -4,8 +4,8 @@ import ( "encoding/json" "testing" - "github.com/go-spring-projects/go-spring/conf" - "github.com/go-spring-projects/go-spring/internal/utils/assert" + "go-spring.dev/spring/conf" + "go-spring.dev/spring/internal/utils/assert" ) func TestMap(t *testing.T) { diff --git a/dync/string.go b/dync/string.go index aeb026c3..12d2db0d 100644 --- a/dync/string.go +++ b/dync/string.go @@ -20,7 +20,7 @@ import ( "encoding/json" "sync/atomic" - "github.com/go-spring-projects/go-spring/conf" + "go-spring.dev/spring/conf" ) var _ conf.Value = (*String)(nil) diff --git a/dync/string_test.go b/dync/string_test.go index d5b20512..e7c2d7d1 100644 --- a/dync/string_test.go +++ b/dync/string_test.go @@ -20,8 +20,8 @@ import ( "encoding/json" "testing" - "github.com/go-spring-projects/go-spring/conf" - "github.com/go-spring-projects/go-spring/internal/utils/assert" + "go-spring.dev/spring/conf" + "go-spring.dev/spring/internal/utils/assert" ) func TestString(t *testing.T) { diff --git a/dync/time.go b/dync/time.go index 08fbdbbb..b0e3af58 100644 --- a/dync/time.go +++ b/dync/time.go @@ -21,7 +21,7 @@ import ( "sync/atomic" "time" - "github.com/go-spring-projects/go-spring/conf" + "go-spring.dev/spring/conf" ) var _ conf.Value = (*Time)(nil) diff --git a/dync/time_test.go b/dync/time_test.go index a860f2a9..dd98fa94 100644 --- a/dync/time_test.go +++ b/dync/time_test.go @@ -21,8 +21,8 @@ import ( "testing" "time" - "github.com/go-spring-projects/go-spring/conf" - "github.com/go-spring-projects/go-spring/internal/utils/assert" + "go-spring.dev/spring/conf" + "go-spring.dev/spring/internal/utils/assert" ) func TestTime(t *testing.T) { diff --git a/dync/uint32.go b/dync/uint32.go index 322011f8..83499866 100644 --- a/dync/uint32.go +++ b/dync/uint32.go @@ -20,7 +20,7 @@ import ( "encoding/json" "sync/atomic" - "github.com/go-spring-projects/go-spring/conf" + "go-spring.dev/spring/conf" ) var _ conf.Value = (*Uint32)(nil) diff --git a/dync/uint32_test.go b/dync/uint32_test.go index e5847abf..fa8d3a03 100644 --- a/dync/uint32_test.go +++ b/dync/uint32_test.go @@ -20,8 +20,8 @@ import ( "encoding/json" "testing" - "github.com/go-spring-projects/go-spring/conf" - "github.com/go-spring-projects/go-spring/internal/utils/assert" + "go-spring.dev/spring/conf" + "go-spring.dev/spring/internal/utils/assert" ) func TestUint32(t *testing.T) { diff --git a/dync/uint64.go b/dync/uint64.go index 8b16c72e..4421db73 100644 --- a/dync/uint64.go +++ b/dync/uint64.go @@ -20,7 +20,7 @@ import ( "encoding/json" "sync/atomic" - "github.com/go-spring-projects/go-spring/conf" + "go-spring.dev/spring/conf" ) var _ conf.Value = (*Uint64)(nil) diff --git a/dync/uint64_test.go b/dync/uint64_test.go index 644dd6fe..c7eaf9c2 100644 --- a/dync/uint64_test.go +++ b/dync/uint64_test.go @@ -20,8 +20,8 @@ import ( "encoding/json" "testing" - "github.com/go-spring-projects/go-spring/conf" - "github.com/go-spring-projects/go-spring/internal/utils/assert" + "go-spring.dev/spring/conf" + "go-spring.dev/spring/internal/utils/assert" ) func TestUint64(t *testing.T) { diff --git a/dync/value.go b/dync/value.go index 836bdb89..b6d45138 100644 --- a/dync/value.go +++ b/dync/value.go @@ -20,7 +20,7 @@ import ( "encoding/json" "sync/atomic" - "github.com/go-spring-projects/go-spring/conf" + "go-spring.dev/spring/conf" ) var _ conf.Value = (*Value[any])(nil) diff --git a/dync/value_test.go b/dync/value_test.go index 5eea6b33..5985e455 100644 --- a/dync/value_test.go +++ b/dync/value_test.go @@ -21,8 +21,8 @@ import ( "testing" "time" - "github.com/go-spring-projects/go-spring/conf" - "github.com/go-spring-projects/go-spring/internal/utils/assert" + "go-spring.dev/spring/conf" + "go-spring.dev/spring/internal/utils/assert" ) func TestValue_Uint32(t *testing.T) { diff --git a/go.mod b/go.mod index be684409..cd72e310 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/go-spring-projects/go-spring +module go-spring.dev/spring go 1.21 diff --git a/gs/app.go b/gs/app.go index d5ee9450..30f4a54b 100644 --- a/gs/app.go +++ b/gs/app.go @@ -27,8 +27,8 @@ import ( "syscall" "unicode/utf8" - "github.com/go-spring-projects/go-spring/conf" - "github.com/go-spring-projects/go-spring/gs/arg" + "go-spring.dev/spring/conf" + "go-spring.dev/spring/gs/arg" ) // AppEvent start and stop events diff --git a/gs/app_args.go b/gs/app_args.go index 24d36a68..de8a6b03 100644 --- a/gs/app_args.go +++ b/gs/app_args.go @@ -21,7 +21,7 @@ import ( "os" "strings" - "github.com/go-spring-projects/go-spring/conf" + "go-spring.dev/spring/conf" ) // EnvPrefix environment variable prefix。 diff --git a/gs/app_args_test.go b/gs/app_args_test.go index f63b2ee8..4d281464 100644 --- a/gs/app_args_test.go +++ b/gs/app_args_test.go @@ -19,8 +19,8 @@ package gs import ( "testing" - "github.com/go-spring-projects/go-spring/conf" - "github.com/go-spring-projects/go-spring/internal/utils/assert" + "go-spring.dev/spring/conf" + "go-spring.dev/spring/internal/utils/assert" ) func TestLoadCmdArgs(t *testing.T) { diff --git a/gs/app_configuration.go b/gs/app_configuration.go index 098866ae..55576e70 100644 --- a/gs/app_configuration.go +++ b/gs/app_configuration.go @@ -21,7 +21,7 @@ import ( "os" "path/filepath" - "github.com/go-spring-projects/go-spring/conf" + "go-spring.dev/spring/conf" ) type AppConfiguration struct { diff --git a/gs/app_test.go b/gs/app_test.go index 0e214746..6f372ffa 100644 --- a/gs/app_test.go +++ b/gs/app_test.go @@ -21,7 +21,7 @@ import ( "testing" "time" - "github.com/go-spring-projects/go-spring/internal/utils/assert" + "go-spring.dev/spring/internal/utils/assert" ) func startApplication(cfgLocation string, fn func(Context)) *App { diff --git a/gs/arg/arg.go b/gs/arg/arg.go index cd95a638..fb311324 100644 --- a/gs/arg/arg.go +++ b/gs/arg/arg.go @@ -25,8 +25,8 @@ import ( "reflect" "runtime" - "github.com/go-spring-projects/go-spring/gs/cond" - "github.com/go-spring-projects/go-spring/internal/utils" + "go-spring.dev/spring/gs/cond" + "go-spring.dev/spring/internal/utils" ) // Context defines some methods of IoC container that Callable use. diff --git a/gs/arg/arg_mock.go b/gs/arg/arg_mock.go index 72bf0eee..b939bd48 100644 --- a/gs/arg/arg_mock.go +++ b/gs/arg/arg_mock.go @@ -7,7 +7,7 @@ package arg import ( reflect "reflect" - cond "github.com/go-spring-projects/go-spring/gs/cond" + cond "go-spring.dev/spring/gs/cond" gomock "github.com/golang/mock/gomock" ) diff --git a/gs/arg/arg_test.go b/gs/arg/arg_test.go index 70c90654..0409cde8 100644 --- a/gs/arg/arg_test.go +++ b/gs/arg/arg_test.go @@ -20,9 +20,9 @@ import ( "reflect" "testing" - "github.com/go-spring-projects/go-spring/gs/cond" - "github.com/go-spring-projects/go-spring/internal/utils/assert" "github.com/golang/mock/gomock" + "go-spring.dev/spring/gs/cond" + "go-spring.dev/spring/internal/utils/assert" ) func TestBind(t *testing.T) { diff --git a/gs/boot.go b/gs/boot.go index 54037a2e..8d202509 100644 --- a/gs/boot.go +++ b/gs/boot.go @@ -21,8 +21,8 @@ import ( "os" "reflect" - "github.com/go-spring-projects/go-spring/gs/arg" - "github.com/go-spring-projects/go-spring/internal/utils" + "go-spring.dev/spring/gs/arg" + "go-spring.dev/spring/internal/utils" ) var bootApp = NewApp() diff --git a/gs/cond/cond.go b/gs/cond/cond.go index 82f7ee5a..1215b0a0 100644 --- a/gs/cond/cond.go +++ b/gs/cond/cond.go @@ -26,8 +26,8 @@ import ( "strings" "github.com/expr-lang/expr" - "github.com/go-spring-projects/go-spring/conf" - "github.com/go-spring-projects/go-spring/internal/utils" + "go-spring.dev/spring/conf" + "go-spring.dev/spring/internal/utils" ) // UnimplementedMethod throws this error when calling an unimplemented method. diff --git a/gs/cond/cond_mock.go b/gs/cond/cond_mock.go index 2d8f9a3b..e0bf3466 100644 --- a/gs/cond/cond_mock.go +++ b/gs/cond/cond_mock.go @@ -7,7 +7,7 @@ package cond import ( reflect "reflect" - conf "github.com/go-spring-projects/go-spring/conf" + conf "go-spring.dev/spring/conf" gomock "github.com/golang/mock/gomock" ) diff --git a/gs/cond/cond_test.go b/gs/cond/cond_test.go index 0b6605a8..1bdd90ee 100644 --- a/gs/cond/cond_test.go +++ b/gs/cond/cond_test.go @@ -20,9 +20,9 @@ import ( "errors" "testing" - "github.com/go-spring-projects/go-spring/internal/utils" - "github.com/go-spring-projects/go-spring/internal/utils/assert" "github.com/golang/mock/gomock" + "go-spring.dev/spring/internal/utils" + "go-spring.dev/spring/internal/utils/assert" ) func TestOK(t *testing.T) { diff --git a/gs/gs.go b/gs/gs.go index 9bb98c4f..31a2c3dc 100644 --- a/gs/gs.go +++ b/gs/gs.go @@ -31,11 +31,11 @@ import ( "sync" "time" - "github.com/go-spring-projects/go-spring/conf" - "github.com/go-spring-projects/go-spring/dync" - "github.com/go-spring-projects/go-spring/gs/arg" - "github.com/go-spring-projects/go-spring/gs/cond" - "github.com/go-spring-projects/go-spring/internal/utils" + "go-spring.dev/spring/conf" + "go-spring.dev/spring/dync" + "go-spring.dev/spring/gs/arg" + "go-spring.dev/spring/gs/cond" + "go-spring.dev/spring/internal/utils" ) type refreshState int diff --git a/gs/gs_bean.go b/gs/gs_bean.go index be9c4044..1f99a537 100644 --- a/gs/gs_bean.go +++ b/gs/gs_bean.go @@ -24,9 +24,9 @@ import ( "runtime" "strings" - "github.com/go-spring-projects/go-spring/gs/arg" - "github.com/go-spring-projects/go-spring/gs/cond" - "github.com/go-spring-projects/go-spring/internal/utils" + "go-spring.dev/spring/gs/arg" + "go-spring.dev/spring/gs/cond" + "go-spring.dev/spring/internal/utils" ) type beanStatus int8 diff --git a/gs/gs_bean_test.go b/gs/gs_bean_test.go index 0cf08217..cd4f0fe5 100644 --- a/gs/gs_bean_test.go +++ b/gs/gs_bean_test.go @@ -23,10 +23,10 @@ import ( "reflect" "testing" - pkg1 "github.com/go-spring-projects/go-spring/gs/testdata/pkg/bar" - pkg2 "github.com/go-spring-projects/go-spring/gs/testdata/pkg/foo" - "github.com/go-spring-projects/go-spring/internal/utils" - "github.com/go-spring-projects/go-spring/internal/utils/assert" + pkg1 "go-spring.dev/spring/gs/testdata/pkg/bar" + pkg2 "go-spring.dev/spring/gs/testdata/pkg/foo" + "go-spring.dev/spring/internal/utils" + "go-spring.dev/spring/internal/utils/assert" ) //func TestParseSingletonTag(t *testing.T) { @@ -106,18 +106,18 @@ func TestBeanDefinition_Match(t *testing.T) { beanName string expect bool }{ - {NewBean(new(pkg2.SamePkg)), "github.com/go-spring-projects/go-spring/gs/testdata/pkg/foo/pkg.SamePkg", "SamePkg", true}, + {NewBean(new(pkg2.SamePkg)), "go-spring.dev/spring/gs/testdata/pkg/foo/pkg.SamePkg", "SamePkg", true}, {NewBean(new(pkg2.SamePkg)), "", "SamePkg", true}, - {NewBean(new(pkg2.SamePkg)), "github.com/go-spring-projects/go-spring/gs/testdata/pkg/foo/pkg.SamePkg", "", true}, - {NewBean(new(pkg2.SamePkg)).Name("pkg2"), "github.com/go-spring-projects/go-spring/gs/testdata/pkg/foo/pkg.SamePkg", "pkg2", true}, + {NewBean(new(pkg2.SamePkg)), "go-spring.dev/spring/gs/testdata/pkg/foo/pkg.SamePkg", "", true}, + {NewBean(new(pkg2.SamePkg)).Name("pkg2"), "go-spring.dev/spring/gs/testdata/pkg/foo/pkg.SamePkg", "pkg2", true}, {NewBean(new(pkg2.SamePkg)).Name("pkg2"), "", "pkg2", true}, - {NewBean(new(pkg2.SamePkg)).Name("pkg2"), "github.com/go-spring-projects/go-spring/gs/testdata/pkg/foo/pkg.SamePkg", "pkg2", true}, - {NewBean(new(pkg1.SamePkg)), "github.com/go-spring-projects/go-spring/gs/testdata/pkg/bar/pkg.SamePkg", "SamePkg", true}, + {NewBean(new(pkg2.SamePkg)).Name("pkg2"), "go-spring.dev/spring/gs/testdata/pkg/foo/pkg.SamePkg", "pkg2", true}, + {NewBean(new(pkg1.SamePkg)), "go-spring.dev/spring/gs/testdata/pkg/bar/pkg.SamePkg", "SamePkg", true}, {NewBean(new(pkg1.SamePkg)), "", "SamePkg", true}, - {NewBean(new(pkg1.SamePkg)), "github.com/go-spring-projects/go-spring/gs/testdata/pkg/bar/pkg.SamePkg", "", true}, - {NewBean(new(pkg1.SamePkg)).Name("pkg1"), "github.com/go-spring-projects/go-spring/gs/testdata/pkg/bar/pkg.SamePkg", "pkg1", true}, + {NewBean(new(pkg1.SamePkg)), "go-spring.dev/spring/gs/testdata/pkg/bar/pkg.SamePkg", "", true}, + {NewBean(new(pkg1.SamePkg)).Name("pkg1"), "go-spring.dev/spring/gs/testdata/pkg/bar/pkg.SamePkg", "pkg1", true}, {NewBean(new(pkg1.SamePkg)).Name("pkg1"), "", "pkg1", true}, - {NewBean(new(pkg1.SamePkg)).Name("pkg1"), "github.com/go-spring-projects/go-spring/gs/testdata/pkg/bar/pkg.SamePkg", "pkg1", true}, + {NewBean(new(pkg1.SamePkg)).Name("pkg1"), "go-spring.dev/spring/gs/testdata/pkg/bar/pkg.SamePkg", "pkg1", true}, } for i, s := range data { @@ -186,17 +186,17 @@ func TestObjectBean(t *testing.T) { NewBean(newHistoryTeacher("")): { "historyTeacher", - "github.com/go-spring-projects/go-spring/gs/gs.historyTeacher", + "go-spring.dev/spring/gs/gs.historyTeacher", }, NewBean(new(pkg2.SamePkg)): { "SamePkg", - "github.com/go-spring-projects/go-spring/gs/testdata/pkg/foo/pkg.SamePkg", + "go-spring.dev/spring/gs/testdata/pkg/foo/pkg.SamePkg", }, NewBean(new(pkg2.SamePkg)).Name("pkg2"): { "pkg2", - "github.com/go-spring-projects/go-spring/gs/testdata/pkg/foo/pkg.SamePkg", + "go-spring.dev/spring/gs/testdata/pkg/foo/pkg.SamePkg", }, } diff --git a/gs/gs_context.go b/gs/gs_context.go index 6c7f23e5..8f8a864a 100644 --- a/gs/gs_context.go +++ b/gs/gs_context.go @@ -21,9 +21,9 @@ import ( "fmt" "reflect" - "github.com/go-spring-projects/go-spring/conf" - "github.com/go-spring-projects/go-spring/gs/arg" - "github.com/go-spring-projects/go-spring/internal/utils" + "go-spring.dev/spring/conf" + "go-spring.dev/spring/gs/arg" + "go-spring.dev/spring/internal/utils" ) func (c *container) Keys() []string { diff --git a/gs/gs_dynamic_test.go b/gs/gs_dynamic_test.go index 45c765f8..d9504232 100644 --- a/gs/gs_dynamic_test.go +++ b/gs/gs_dynamic_test.go @@ -20,9 +20,9 @@ import ( "encoding/json" "testing" - "github.com/go-spring-projects/go-spring/conf" - "github.com/go-spring-projects/go-spring/dync" - "github.com/go-spring-projects/go-spring/internal/utils/assert" + "go-spring.dev/spring/conf" + "go-spring.dev/spring/dync" + "go-spring.dev/spring/internal/utils/assert" ) type DynamicConfig struct { diff --git a/gs/gs_test.go b/gs/gs_test.go index e069c3df..2fcd51dc 100644 --- a/gs/gs_test.go +++ b/gs/gs_test.go @@ -30,14 +30,14 @@ import ( "testing" "time" - "github.com/go-spring-projects/go-spring/conf" - "github.com/go-spring-projects/go-spring/gs/arg" - "github.com/go-spring-projects/go-spring/gs/cond" - pkg1 "github.com/go-spring-projects/go-spring/gs/testdata/pkg/bar" - pkg2 "github.com/go-spring-projects/go-spring/gs/testdata/pkg/foo" - "github.com/go-spring-projects/go-spring/internal/utils" - "github.com/go-spring-projects/go-spring/internal/utils/assert" "github.com/spf13/cast" + "go-spring.dev/spring/conf" + "go-spring.dev/spring/gs/arg" + "go-spring.dev/spring/gs/cond" + pkg1 "go-spring.dev/spring/gs/testdata/pkg/bar" + pkg2 "go-spring.dev/spring/gs/testdata/pkg/foo" + "go-spring.dev/spring/internal/utils" + "go-spring.dev/spring/internal/utils/assert" ) func runTest(c Container, fn func(Context)) error { @@ -394,7 +394,7 @@ type Pkg interface { type SamePkgHolder struct { // Pkg `autowire:""` // 这种方式会找到多个符合条件的 Object - Pkg `autowire:"github.com/go-spring-projects/go-spring/gs/testdata/pkg/bar/pkg.SamePkg:SamePkg"` + Pkg `autowire:"go-spring.dev/spring/gs/testdata/pkg/bar/pkg.SamePkg:SamePkg"` } func TestApplicationContext_SameNameBean(t *testing.T) { @@ -410,19 +410,19 @@ type DiffPkgOne struct { } func (d *DiffPkgOne) Package() { - fmt.Println("github.com/go-spring-projects/go-spring/gs.DiffPkgOne") + fmt.Println("go-spring.dev/spring/gs.DiffPkgOne") } type DiffPkgTwo struct { } func (d *DiffPkgTwo) Package() { - fmt.Println("github.com/go-spring-projects/go-spring/gs.DiffPkgTwo") + fmt.Println("go-spring.dev/spring/gs.DiffPkgTwo") } type DiffPkgHolder struct { // Pkg `autowire:"same"` // 如果两个 Object 不小心重名了,也会找到多个符合条件的 Object - Pkg `autowire:"github.com/go-spring-projects/go-spring/gs/gs.DiffPkgTwo:same"` + Pkg `autowire:"go-spring.dev/spring/gs/gs.DiffPkgTwo:same"` } func TestApplicationContext_DiffNameBean(t *testing.T) { @@ -518,10 +518,10 @@ func TestApplicationContext_Get(t *testing.T) { err = p.Get(&grouper, ":BeanTwo") assert.Nil(t, err) - err = p.Get(&two, "github.com/go-spring-projects/go-spring/gs/gs.BeanTwo:BeanTwo") + err = p.Get(&two, "go-spring.dev/spring/gs/gs.BeanTwo:BeanTwo") assert.Nil(t, err) - err = p.Get(&grouper, "github.com/go-spring-projects/go-spring/gs/gs.BeanTwo:BeanTwo") + err = p.Get(&grouper, "go-spring.dev/spring/gs/gs.BeanTwo:BeanTwo") assert.Nil(t, err) err = p.Get(&two, "xxx:BeanTwo") @@ -563,7 +563,7 @@ func TestApplicationContext_Get(t *testing.T) { // fmt.Println(utils.ToJsonString(b)) // assert.Equal(t, len(b), 1) // -// b, _ = p.Find("github.com/go-spring-projects/go-spring/gs/gs.BeanTwo:BeanTwo") +// b, _ = p.Find("go-spring.dev/spring/gs/gs.BeanTwo:BeanTwo") // fmt.Println(utils.ToJsonString(b)) // assert.Equal(t, len(b), 1) // @@ -727,7 +727,7 @@ func TestApplicationContext_DependsOn(t *testing.T) { dependsOn := []BeanSelector{ (*BeanOne)(nil), // 通过类型定义查找 - "github.com/go-spring-projects/go-spring/gs/gs.BeanZero:BeanZero", + "go-spring.dev/spring/gs/gs.BeanZero:BeanZero", } c := New() diff --git a/gs/gs_version.go b/gs/gs_version.go index 432a9ad7..b9f16555 100644 --- a/gs/gs_version.go +++ b/gs/gs_version.go @@ -34,7 +34,7 @@ var Banner = ` func init() { if buildInfo, ok := debug.ReadBuildInfo(); ok { for _, pkg := range buildInfo.Deps { - if strings.HasPrefix(pkg.Path, "github.com/go-spring-projects/go-spring") { + if strings.HasPrefix(pkg.Path, "go-spring.dev/spring") { Version = pkg.Version break } diff --git a/gs/logger.go b/gs/logger.go index cc84d2b7..cb463efe 100644 --- a/gs/logger.go +++ b/gs/logger.go @@ -17,7 +17,7 @@ package gs import ( - "github.com/go-spring-projects/go-spring/internal/log" + "go-spring.dev/spring/internal/log" ) type Logger = log.Logger diff --git a/gs/testdata/pkg/bar/pkg.go b/gs/testdata/pkg/bar/pkg.go index 3ca9f694..ce42f26d 100644 --- a/gs/testdata/pkg/bar/pkg.go +++ b/gs/testdata/pkg/bar/pkg.go @@ -24,5 +24,5 @@ import ( type SamePkg struct{} func (p *SamePkg) Package() { - fmt.Println("github.com/go-spring-projects/go-spring/gs/testdata/pkg/bar/pkg.SamePkg") + fmt.Println("go-spring.dev/spring/gs/testdata/pkg/bar/pkg.SamePkg") } diff --git a/gs/testdata/pkg/foo/pkg.go b/gs/testdata/pkg/foo/pkg.go index 6a4d269e..8ebc8705 100644 --- a/gs/testdata/pkg/foo/pkg.go +++ b/gs/testdata/pkg/foo/pkg.go @@ -24,5 +24,5 @@ import ( type SamePkg struct{} func (p *SamePkg) Package() { - fmt.Println("github.com/go-spring-projects/go-spring/gs/testdata/pkg/foo/pkg.SamePkg") + fmt.Println("go-spring.dev/spring/gs/testdata/pkg/foo/pkg.SamePkg") } diff --git a/internal/log/logger.go b/internal/log/logger.go index ec0495b7..43ea5bcf 100644 --- a/internal/log/logger.go +++ b/internal/log/logger.go @@ -21,7 +21,7 @@ import ( "os" "sync" - "github.com/go-spring-projects/go-spring/internal/utils" + "go-spring.dev/spring/internal/utils" ) type Logger = slog.Logger diff --git a/internal/utils/map_test.go b/internal/utils/map_test.go index 5ef27285..8a4ebaeb 100644 --- a/internal/utils/map_test.go +++ b/internal/utils/map_test.go @@ -20,7 +20,7 @@ import ( "sort" "testing" - "github.com/go-spring-projects/go-spring/internal/utils/assert" + "go-spring.dev/spring/internal/utils/assert" ) func TestSortedKeys(t *testing.T) { diff --git a/internal/utils/panic_test.go b/internal/utils/panic_test.go index 4b3ce3f7..34624899 100644 --- a/internal/utils/panic_test.go +++ b/internal/utils/panic_test.go @@ -20,7 +20,7 @@ import ( "errors" "testing" - "github.com/go-spring-projects/go-spring/internal/utils/assert" + "go-spring.dev/spring/internal/utils/assert" ) func TestPanicCond(t *testing.T) { diff --git a/internal/utils/testdata/pkg/bar/pkg.go b/internal/utils/testdata/pkg/bar/pkg.go index 17425f51..076aeb6b 100644 --- a/internal/utils/testdata/pkg/bar/pkg.go +++ b/internal/utils/testdata/pkg/bar/pkg.go @@ -24,5 +24,5 @@ import ( type SamePkg struct{} func (p *SamePkg) Package() { - fmt.Println("github.com/go-spring-projects/go-spring/internal/utils/testdata/pkg/bar/pkg.SamePkg") + fmt.Println("go-spring.dev/spring/internal/utils/testdata/pkg/bar/pkg.SamePkg") } diff --git a/internal/utils/testdata/pkg/foo/pkg.go b/internal/utils/testdata/pkg/foo/pkg.go index 13d02755..afb5d423 100644 --- a/internal/utils/testdata/pkg/foo/pkg.go +++ b/internal/utils/testdata/pkg/foo/pkg.go @@ -24,5 +24,5 @@ import ( type SamePkg struct{} func (p *SamePkg) Package() { - fmt.Println("github.com/go-spring-projects/go-spring/internal/utils/testdata/pkg/foo/pkg.SamePkg") + fmt.Println("go-spring.dev/spring/internal/utils/testdata/pkg/foo/pkg.SamePkg") } diff --git a/internal/utils/type_mock_test.go b/internal/utils/type_mock_test.go index 9f2dfbf0..af16cbc1 100644 --- a/internal/utils/type_mock_test.go +++ b/internal/utils/type_mock_test.go @@ -20,8 +20,8 @@ import ( "reflect" "testing" - "github.com/go-spring-projects/go-spring/internal/utils/assert" "github.com/golang/mock/gomock" + "go-spring.dev/spring/internal/utils/assert" ) func TestBeanSelector(t *testing.T) { diff --git a/internal/utils/type_test.go b/internal/utils/type_test.go index 5633adc9..a3c50015 100644 --- a/internal/utils/type_test.go +++ b/internal/utils/type_test.go @@ -26,16 +26,16 @@ import ( "testing" "unsafe" - "github.com/go-spring-projects/go-spring/internal/utils/assert" - "github.com/go-spring-projects/go-spring/internal/utils/testdata" - pkg1 "github.com/go-spring-projects/go-spring/internal/utils/testdata/pkg/bar" - pkg2 "github.com/go-spring-projects/go-spring/internal/utils/testdata/pkg/foo" + "go-spring.dev/spring/internal/utils/assert" + "go-spring.dev/spring/internal/utils/testdata" + pkg1 "go-spring.dev/spring/internal/utils/testdata/pkg/bar" + pkg2 "go-spring.dev/spring/internal/utils/testdata/pkg/foo" ) type SamePkg struct{} func (p *SamePkg) Package() { - fmt.Println("github.com/go-spring-projects/go-spring/internal/utils/utils.SamePkg") + fmt.Println("go-spring.dev/spring/internal/utils/utils.SamePkg") } func TestPkgPath(t *testing.T) { @@ -177,7 +177,7 @@ func TestPkgPath(t *testing.T) { reflect.TypeOf(pkg1.SamePkg{}), reflect.Struct, "SamePkg", - "github.com/go-spring-projects/go-spring/internal/utils/testdata/pkg/bar", + "go-spring.dev/spring/internal/utils/testdata/pkg/bar", }, { reflect.TypeOf(new(pkg1.SamePkg)), @@ -201,7 +201,7 @@ func TestPkgPath(t *testing.T) { reflect.TypeOf(pkg2.SamePkg{}), reflect.Struct, "SamePkg", - "github.com/go-spring-projects/go-spring/internal/utils/testdata/pkg/foo", + "go-spring.dev/spring/internal/utils/testdata/pkg/foo", }, { reflect.TypeOf(new(pkg2.SamePkg)), @@ -359,22 +359,22 @@ func TestTypeName(t *testing.T) { reflect.TypeOf(&[]string{"string"}): {"string", "*[]string"}, reflect.TypeOf(make(map[string]string)): {"map[string]string", "map[string]string"}, - pkg1.SamePkg{}: {"github.com/go-spring-projects/go-spring/internal/utils/testdata/pkg/bar/pkg.SamePkg", "pkg.SamePkg"}, - new(pkg1.SamePkg): {"github.com/go-spring-projects/go-spring/internal/utils/testdata/pkg/bar/pkg.SamePkg", "*pkg.SamePkg"}, - reflect.TypeOf(make([]pkg1.SamePkg, 0)): {"github.com/go-spring-projects/go-spring/internal/utils/testdata/pkg/bar/pkg.SamePkg", "[]pkg.SamePkg"}, - reflect.TypeOf(&[]pkg1.SamePkg{}): {"github.com/go-spring-projects/go-spring/internal/utils/testdata/pkg/bar/pkg.SamePkg", "*[]pkg.SamePkg"}, + pkg1.SamePkg{}: {"go-spring.dev/spring/internal/utils/testdata/pkg/bar/pkg.SamePkg", "pkg.SamePkg"}, + new(pkg1.SamePkg): {"go-spring.dev/spring/internal/utils/testdata/pkg/bar/pkg.SamePkg", "*pkg.SamePkg"}, + reflect.TypeOf(make([]pkg1.SamePkg, 0)): {"go-spring.dev/spring/internal/utils/testdata/pkg/bar/pkg.SamePkg", "[]pkg.SamePkg"}, + reflect.TypeOf(&[]pkg1.SamePkg{}): {"go-spring.dev/spring/internal/utils/testdata/pkg/bar/pkg.SamePkg", "*[]pkg.SamePkg"}, reflect.TypeOf(make(map[int]pkg1.SamePkg)): {"map[int]pkg.SamePkg", "map[int]pkg.SamePkg"}, - pkg2.SamePkg{}: {"github.com/go-spring-projects/go-spring/internal/utils/testdata/pkg/foo/pkg.SamePkg", "pkg.SamePkg"}, - new(pkg2.SamePkg): {"github.com/go-spring-projects/go-spring/internal/utils/testdata/pkg/foo/pkg.SamePkg", "*pkg.SamePkg"}, - reflect.TypeOf(make([]pkg2.SamePkg, 0)): {"github.com/go-spring-projects/go-spring/internal/utils/testdata/pkg/foo/pkg.SamePkg", "[]pkg.SamePkg"}, - reflect.TypeOf(&[]pkg2.SamePkg{}): {"github.com/go-spring-projects/go-spring/internal/utils/testdata/pkg/foo/pkg.SamePkg", "*[]pkg.SamePkg"}, + pkg2.SamePkg{}: {"go-spring.dev/spring/internal/utils/testdata/pkg/foo/pkg.SamePkg", "pkg.SamePkg"}, + new(pkg2.SamePkg): {"go-spring.dev/spring/internal/utils/testdata/pkg/foo/pkg.SamePkg", "*pkg.SamePkg"}, + reflect.TypeOf(make([]pkg2.SamePkg, 0)): {"go-spring.dev/spring/internal/utils/testdata/pkg/foo/pkg.SamePkg", "[]pkg.SamePkg"}, + reflect.TypeOf(&[]pkg2.SamePkg{}): {"go-spring.dev/spring/internal/utils/testdata/pkg/foo/pkg.SamePkg", "*[]pkg.SamePkg"}, reflect.TypeOf(make(map[int]pkg2.SamePkg)): {"map[int]pkg.SamePkg", "map[int]pkg.SamePkg"}, - SamePkg{}: {"github.com/go-spring-projects/go-spring/internal/utils/utils.SamePkg", "utils.SamePkg"}, - new(SamePkg): {"github.com/go-spring-projects/go-spring/internal/utils/utils.SamePkg", "*utils.SamePkg"}, - reflect.TypeOf(make([]SamePkg, 0)): {"github.com/go-spring-projects/go-spring/internal/utils/utils.SamePkg", "[]utils.SamePkg"}, - reflect.TypeOf(&[]SamePkg{}): {"github.com/go-spring-projects/go-spring/internal/utils/utils.SamePkg", "*[]utils.SamePkg"}, + SamePkg{}: {"go-spring.dev/spring/internal/utils/utils.SamePkg", "utils.SamePkg"}, + new(SamePkg): {"go-spring.dev/spring/internal/utils/utils.SamePkg", "*utils.SamePkg"}, + reflect.TypeOf(make([]SamePkg, 0)): {"go-spring.dev/spring/internal/utils/utils.SamePkg", "[]utils.SamePkg"}, + reflect.TypeOf(&[]SamePkg{}): {"go-spring.dev/spring/internal/utils/utils.SamePkg", "*[]utils.SamePkg"}, reflect.TypeOf(make(map[int]SamePkg)): {"map[int]utils.SamePkg", "map[int]utils.SamePkg"}, } diff --git a/internal/utils/value_test.go b/internal/utils/value_test.go index 7d26305b..58848498 100644 --- a/internal/utils/value_test.go +++ b/internal/utils/value_test.go @@ -20,8 +20,8 @@ import ( "reflect" "testing" - "github.com/go-spring-projects/go-spring/internal/utils/assert" - "github.com/go-spring-projects/go-spring/internal/utils/testdata" + "go-spring.dev/spring/internal/utils/assert" + "go-spring.dev/spring/internal/utils/testdata" ) func TestPatchValue(t *testing.T) { diff --git a/web/bind.go b/web/bind.go index 23a1d940..6ae7e83c 100644 --- a/web/bind.go +++ b/web/bind.go @@ -23,8 +23,8 @@ import ( "path" "reflect" - "github.com/go-spring-projects/go-spring/internal/utils" - "github.com/go-spring-projects/go-spring/web/binding" + "go-spring.dev/spring/internal/utils" + "go-spring.dev/spring/web/binding" ) type Renderer interface { diff --git a/web/binding/binding.go b/web/binding/binding.go index 87f48945..249ced2e 100644 --- a/web/binding/binding.go +++ b/web/binding/binding.go @@ -28,7 +28,7 @@ import ( "strconv" "strings" - "github.com/go-spring-projects/go-spring/conf" + "go-spring.dev/spring/conf" ) var ErrBinding = errors.New("binding failed") diff --git a/web/binding/binding_test.go b/web/binding/binding_test.go index 0bff8fd6..67579efd 100644 --- a/web/binding/binding_test.go +++ b/web/binding/binding_test.go @@ -24,8 +24,8 @@ import ( "strings" "testing" - "github.com/go-spring-projects/go-spring/internal/utils/assert" - "github.com/go-spring-projects/go-spring/web/binding" + "go-spring.dev/spring/internal/utils/assert" + "go-spring.dev/spring/web/binding" ) type MockRequest struct { diff --git a/web/binding/form_test.go b/web/binding/form_test.go index 4931c2f9..b2820d49 100644 --- a/web/binding/form_test.go +++ b/web/binding/form_test.go @@ -20,8 +20,8 @@ import ( "net/url" "testing" - "github.com/go-spring-projects/go-spring/internal/utils/assert" - "github.com/go-spring-projects/go-spring/web/binding" + "go-spring.dev/spring/internal/utils/assert" + "go-spring.dev/spring/web/binding" ) type FormBindParamCommon struct { diff --git a/web/binding/json_test.go b/web/binding/json_test.go index 33ea00de..c025212a 100644 --- a/web/binding/json_test.go +++ b/web/binding/json_test.go @@ -20,8 +20,8 @@ import ( "encoding/json" "testing" - "github.com/go-spring-projects/go-spring/internal/utils/assert" - "github.com/go-spring-projects/go-spring/web/binding" + "go-spring.dev/spring/internal/utils/assert" + "go-spring.dev/spring/web/binding" ) type JSONBindParamCommon struct { diff --git a/web/binding/xml_test.go b/web/binding/xml_test.go index ecbdb406..6c3652e0 100644 --- a/web/binding/xml_test.go +++ b/web/binding/xml_test.go @@ -20,8 +20,8 @@ import ( "encoding/xml" "testing" - "github.com/go-spring-projects/go-spring/internal/utils/assert" - "github.com/go-spring-projects/go-spring/web/binding" + "go-spring.dev/spring/internal/utils/assert" + "go-spring.dev/spring/web/binding" ) type XMLBindParamCommon struct { diff --git a/web/context.go b/web/context.go index 1c4d14da..032021ff 100644 --- a/web/context.go +++ b/web/context.go @@ -28,9 +28,9 @@ import ( "strings" "unicode" - "github.com/go-spring-projects/go-spring/web/binding" - "github.com/go-spring-projects/go-spring/web/internal/mux" - "github.com/go-spring-projects/go-spring/web/render" + "go-spring.dev/spring/web/binding" + "go-spring.dev/spring/web/internal/mux" + "go-spring.dev/spring/web/render" ) type contextKey struct{} diff --git a/web/examples/go.mod b/web/examples/go.mod index 05d2ee89..773a80a9 100644 --- a/web/examples/go.mod +++ b/web/examples/go.mod @@ -2,9 +2,9 @@ module examples go 1.21.1 -replace github.com/go-spring-projects/go-spring => ../../ +replace go-spring.dev/spring => ../../ -require github.com/go-spring-projects/go-spring v0.0.0-00010101000000-000000000000 +require go-spring.dev/spring v0.0.0-00010101000000-000000000000 require ( github.com/expr-lang/expr v1.15.7 // indirect diff --git a/web/examples/greeting/main.go b/web/examples/greeting/main.go index e060bd78..9a63d5d2 100644 --- a/web/examples/greeting/main.go +++ b/web/examples/greeting/main.go @@ -24,9 +24,9 @@ import ( "net/http" "time" - "github.com/go-spring-projects/go-spring/gs" - "github.com/go-spring-projects/go-spring/web" - _ "github.com/go-spring-projects/go-spring/web/starter" + "go-spring.dev/spring/gs" + "go-spring.dev/spring/web" + _ "go-spring.dev/spring/web/starter" ) type Greeting struct { diff --git a/web/group.go b/web/group.go index 21a3fbde..6b7bfa35 100644 --- a/web/group.go +++ b/web/group.go @@ -19,7 +19,7 @@ package web import ( "net/http" - "github.com/go-spring-projects/go-spring/web/internal/mux" + "go-spring.dev/spring/web/internal/mux" ) // MiddlewareFunc is a function which receives an http.Handler and returns another http.Handler. diff --git a/web/internal/mux/example_authentication_middleware_test.go b/web/internal/mux/example_authentication_middleware_test.go index 8a3462b2..f6878a95 100644 --- a/web/internal/mux/example_authentication_middleware_test.go +++ b/web/internal/mux/example_authentication_middleware_test.go @@ -4,7 +4,7 @@ import ( "log" "net/http" - "github.com/go-spring-projects/go-spring/web/internal/mux" + "go-spring.dev/spring/web/internal/mux" ) // Define our struct diff --git a/web/internal/mux/example_cors_method_middleware_test.go b/web/internal/mux/example_cors_method_middleware_test.go index 549851ba..acd51fac 100644 --- a/web/internal/mux/example_cors_method_middleware_test.go +++ b/web/internal/mux/example_cors_method_middleware_test.go @@ -5,7 +5,7 @@ import ( "net/http" "net/http/httptest" - "github.com/go-spring-projects/go-spring/web/internal/mux" + "go-spring.dev/spring/web/internal/mux" ) func ExampleCORSMethodMiddleware() { diff --git a/web/internal/mux/example_route_test.go b/web/internal/mux/example_route_test.go index c3ec7de0..5d80db22 100644 --- a/web/internal/mux/example_route_test.go +++ b/web/internal/mux/example_route_test.go @@ -4,7 +4,7 @@ import ( "fmt" "net/http" - "github.com/go-spring-projects/go-spring/web/internal/mux" + "go-spring.dev/spring/web/internal/mux" ) // This example demonstrates setting a regular expression matcher for diff --git a/web/internal/mux/example_route_vars_test.go b/web/internal/mux/example_route_vars_test.go index 20f02123..ee750cf8 100644 --- a/web/internal/mux/example_route_vars_test.go +++ b/web/internal/mux/example_route_vars_test.go @@ -3,7 +3,7 @@ package mux_test import ( "fmt" - "github.com/go-spring-projects/go-spring/web/internal/mux" + "go-spring.dev/spring/web/internal/mux" ) // This example demonstrates building a dynamic URL using diff --git a/web/render/binary_test.go b/web/render/binary_test.go index cd1df094..130e022c 100644 --- a/web/render/binary_test.go +++ b/web/render/binary_test.go @@ -21,7 +21,7 @@ import ( "net/http/httptest" "testing" - "github.com/go-spring-projects/go-spring/internal/utils/assert" + "go-spring.dev/spring/internal/utils/assert" ) func TestBinaryRenderer(t *testing.T) { diff --git a/web/render/html_test.go b/web/render/html_test.go index cd0a9a36..f255553b 100644 --- a/web/render/html_test.go +++ b/web/render/html_test.go @@ -21,7 +21,7 @@ import ( "net/http/httptest" "testing" - "github.com/go-spring-projects/go-spring/internal/utils/assert" + "go-spring.dev/spring/internal/utils/assert" ) func TestHTMLRenderer(t *testing.T) { diff --git a/web/render/json_test.go b/web/render/json_test.go index ab4bc411..dec3727d 100644 --- a/web/render/json_test.go +++ b/web/render/json_test.go @@ -20,7 +20,7 @@ import ( "net/http/httptest" "testing" - "github.com/go-spring-projects/go-spring/internal/utils/assert" + "go-spring.dev/spring/internal/utils/assert" ) func TestJSONRenderer(t *testing.T) { diff --git a/web/render/redirect_test.go b/web/render/redirect_test.go index e1084fde..e18ef3f3 100644 --- a/web/render/redirect_test.go +++ b/web/render/redirect_test.go @@ -21,7 +21,7 @@ import ( "net/http/httptest" "testing" - "github.com/go-spring-projects/go-spring/internal/utils/assert" + "go-spring.dev/spring/internal/utils/assert" ) func TestRedirectRenderer(t *testing.T) { diff --git a/web/render/text_test.go b/web/render/text_test.go index 167efad9..aa300efc 100644 --- a/web/render/text_test.go +++ b/web/render/text_test.go @@ -20,7 +20,7 @@ import ( "net/http/httptest" "testing" - "github.com/go-spring-projects/go-spring/internal/utils/assert" + "go-spring.dev/spring/internal/utils/assert" ) func TestTextRenderer(t *testing.T) { diff --git a/web/render/xml_test.go b/web/render/xml_test.go index cbc53658..e4da0798 100644 --- a/web/render/xml_test.go +++ b/web/render/xml_test.go @@ -21,7 +21,7 @@ import ( "net/http/httptest" "testing" - "github.com/go-spring-projects/go-spring/internal/utils/assert" + "go-spring.dev/spring/internal/utils/assert" ) type xmlmap map[string]any diff --git a/web/server.go b/web/server.go index 009500ca..898933f7 100644 --- a/web/server.go +++ b/web/server.go @@ -20,7 +20,7 @@ import ( "context" "net/http" - "github.com/go-spring-projects/go-spring/web/internal/mux" + "go-spring.dev/spring/web/internal/mux" ) // A Server defines parameters for running an HTTP server. diff --git a/web/starter/configuration.go b/web/starter/configuration.go index 0da7676b..eb3c58e2 100644 --- a/web/starter/configuration.go +++ b/web/starter/configuration.go @@ -23,9 +23,9 @@ import ( "log/slog" "net/http" - "github.com/go-spring-projects/go-spring/gs" - "github.com/go-spring-projects/go-spring/gs/cond" - "github.com/go-spring-projects/go-spring/web" + "go-spring.dev/spring/gs" + "go-spring.dev/spring/gs/cond" + "go-spring.dev/spring/web" ) func init() {