mirror of
https://gitee.com/johng/gf
synced 2026-06-07 10:22:11 +08:00
Compare commits
3 Commits
v2.10.1
...
contrib/co
| Author | SHA1 | Date | |
|---|---|---|---|
| 9a91bd203b | |||
| 72733e0bad | |||
| d44e082ff5 |
1
Makefile
1
Makefile
@ -34,6 +34,7 @@ branch:
|
||||
version:
|
||||
@set -e; \
|
||||
newVersion=$(to); \
|
||||
$(MAKE) -C cmd/gf pack; \
|
||||
./.make_version.sh ./ $$newVersion; \
|
||||
echo "make version to=$(to) done"
|
||||
|
||||
|
||||
@ -46,7 +46,7 @@ go get -u github.com/gogf/gf/v2
|
||||
💖 [Thanks to all the contributors who made GoFrame possible](https://github.com/gogf/gf/graphs/contributors) 💖
|
||||
|
||||
<a href="https://github.com/gogf/gf/graphs/contributors">
|
||||
<img src="https://goframe.org/img/contributors.svg?version=v2.10.1" alt="goframe contributors"/>
|
||||
<img src="https://goframe.org/img/contributors.svg?version=v2.10.2" alt="goframe contributors"/>
|
||||
</a>
|
||||
|
||||
## License
|
||||
|
||||
@ -46,7 +46,7 @@ go get -u github.com/gogf/gf/v2
|
||||
💖 [感谢所有使 GoFrame 成为可能的贡献者](https://github.com/gogf/gf/graphs/contributors) 💖
|
||||
|
||||
<a href="https://github.com/gogf/gf/graphs/contributors">
|
||||
<img src="https://goframe.org/img/contributors.svg?version=v2.10.1" alt="goframe contributors"/>
|
||||
<img src="https://goframe.org/img/contributors.svg?version=v2.10.2" alt="goframe contributors"/>
|
||||
</a>
|
||||
|
||||
## 许可证
|
||||
|
||||
@ -18,9 +18,6 @@ pack.template-mono:
|
||||
@cd temp && gf pack template-mono ../internal/packed/template-mono.go -n=packed -y
|
||||
@rm -fr temp
|
||||
|
||||
# Note:
|
||||
# command `sed` only works on MacOS.
|
||||
# use `grep -irl 'template-single' temp| xargs sed -i'' -e 's/template-single/template-mono-app/g'` on other platforms.
|
||||
pack.template-mono-app:
|
||||
@rm -fr temp
|
||||
@mkdir temp || exit 0
|
||||
@ -31,6 +28,6 @@ pack.template-mono-app:
|
||||
@rm -fr temp/template-mono-app/.gitignore
|
||||
@rm -fr temp/template-mono-app/go.mod
|
||||
@rm -fr temp/template-mono-app/go.sum
|
||||
@grep -irl 'template-single' temp| xargs sed -i '' -e 's/template-single/template-mono-app/g'
|
||||
@grep -irl 'template-single' temp| xargs perl -pi -e 's/template-single/template-mono-app/g'
|
||||
@cd temp && gf pack template-mono-app ../internal/packed/template-mono-app.go -n=packed -y
|
||||
@rm -fr temp
|
||||
@ -3,13 +3,13 @@ module github.com/gogf/gf/cmd/gf/v2
|
||||
go 1.23.0
|
||||
|
||||
require (
|
||||
github.com/gogf/gf/contrib/drivers/clickhouse/v2 v2.10.1
|
||||
github.com/gogf/gf/contrib/drivers/mssql/v2 v2.10.1
|
||||
github.com/gogf/gf/contrib/drivers/mysql/v2 v2.10.1
|
||||
github.com/gogf/gf/contrib/drivers/oracle/v2 v2.10.1
|
||||
github.com/gogf/gf/contrib/drivers/pgsql/v2 v2.10.1
|
||||
github.com/gogf/gf/contrib/drivers/sqlite/v2 v2.10.1
|
||||
github.com/gogf/gf/v2 v2.10.1
|
||||
github.com/gogf/gf/contrib/drivers/clickhouse/v2 v2.10.2
|
||||
github.com/gogf/gf/contrib/drivers/mssql/v2 v2.10.2
|
||||
github.com/gogf/gf/contrib/drivers/mysql/v2 v2.10.2
|
||||
github.com/gogf/gf/contrib/drivers/oracle/v2 v2.10.2
|
||||
github.com/gogf/gf/contrib/drivers/pgsql/v2 v2.10.2
|
||||
github.com/gogf/gf/contrib/drivers/sqlite/v2 v2.10.2
|
||||
github.com/gogf/gf/v2 v2.10.2
|
||||
github.com/gogf/selfupdate v0.0.0-20231215043001-5c48c528462f
|
||||
github.com/olekukonko/tablewriter v1.1.0
|
||||
github.com/schollz/progressbar/v3 v3.15.0
|
||||
|
||||
@ -232,14 +232,17 @@ func (c cInit) initFromBuiltin(ctx context.Context, in cInitInput) (out *cInitOu
|
||||
return content
|
||||
}
|
||||
}
|
||||
mlog.Debugf("replace %s %s to %s", path, cInitRepoPrefix+templateRepoName, in.Module)
|
||||
return gstr.Replace(gfile.GetContents(path), cInitRepoPrefix+templateRepoName, in.Module)
|
||||
}, in.Name, "*", true)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
// Format the generated Go files.
|
||||
utils.GoFmt(in.Name)
|
||||
// Format the generated Go files using go/format (not goimports).
|
||||
// utils.GoFmt uses imports.Process which may remove local import paths that cannot
|
||||
// be resolved in the GOPATH or module cache right after generation (e.g. "myapp/api/hello/v1").
|
||||
geninit.FormatGoFiles(in.Name)
|
||||
|
||||
// Update the GoFrame version.
|
||||
if in.Update {
|
||||
|
||||
@ -85,7 +85,7 @@ func generateProject(ctx context.Context, srcPath, name, oldModule, newModule st
|
||||
// 6. Format the generated Go files using go/format (not imports.Process)
|
||||
// Note: We use formatGoFiles instead of utils.GoFmt because imports.Process
|
||||
// may incorrectly "fix" local import paths by replacing them with cached module paths.
|
||||
formatGoFiles(dstPath)
|
||||
FormatGoFiles(dstPath)
|
||||
|
||||
mlog.Print("Project generated successfully!")
|
||||
return nil
|
||||
@ -115,10 +115,10 @@ func upgradeDependencies(ctx context.Context, projectDir string) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// formatGoFiles formats all Go files in the directory using go/format.
|
||||
// FormatGoFiles formats all Go files in the directory using go/format.
|
||||
// Unlike imports.Process, this only formats code without modifying imports,
|
||||
// which prevents incorrect "fixing" of local import paths.
|
||||
func formatGoFiles(dir string) {
|
||||
func FormatGoFiles(dir string) {
|
||||
files, err := findGoFiles(dir)
|
||||
if err != nil {
|
||||
mlog.Printf("Failed to find Go files for formatting: %v", err)
|
||||
|
||||
@ -4,7 +4,7 @@ go 1.23.0
|
||||
|
||||
toolchain go1.24.6
|
||||
|
||||
require github.com/gogf/gf/v2 v2.10.0
|
||||
require github.com/gogf/gf/v2 v2.10.1
|
||||
|
||||
require (
|
||||
go.opentelemetry.io/otel v1.38.0 // indirect
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -4,7 +4,7 @@ go 1.23.0
|
||||
|
||||
require (
|
||||
github.com/apolloconfig/agollo/v4 v4.3.1
|
||||
github.com/gogf/gf/v2 v2.10.1
|
||||
github.com/gogf/gf/v2 v2.10.2
|
||||
)
|
||||
|
||||
require (
|
||||
|
||||
@ -3,7 +3,7 @@ module github.com/gogf/gf/contrib/config/consul/v2
|
||||
go 1.23.0
|
||||
|
||||
require (
|
||||
github.com/gogf/gf/v2 v2.10.1
|
||||
github.com/gogf/gf/v2 v2.10.2
|
||||
github.com/hashicorp/consul/api v1.24.0
|
||||
github.com/hashicorp/go-cleanhttp v0.5.2
|
||||
)
|
||||
|
||||
@ -3,7 +3,7 @@ module github.com/gogf/gf/contrib/config/kubecm/v2
|
||||
go 1.24.0
|
||||
|
||||
require (
|
||||
github.com/gogf/gf/v2 v2.10.1
|
||||
github.com/gogf/gf/v2 v2.10.2
|
||||
k8s.io/api v0.33.4
|
||||
k8s.io/apimachinery v0.33.4
|
||||
k8s.io/client-go v0.33.4
|
||||
|
||||
@ -3,7 +3,7 @@ module github.com/gogf/gf/contrib/config/nacos/v2
|
||||
go 1.23.0
|
||||
|
||||
require (
|
||||
github.com/gogf/gf/v2 v2.10.1
|
||||
github.com/gogf/gf/v2 v2.10.2
|
||||
github.com/nacos-group/nacos-sdk-go/v2 v2.3.3
|
||||
)
|
||||
|
||||
|
||||
@ -3,7 +3,7 @@ module github.com/gogf/gf/contrib/config/polaris/v2
|
||||
go 1.23.0
|
||||
|
||||
require (
|
||||
github.com/gogf/gf/v2 v2.10.1
|
||||
github.com/gogf/gf/v2 v2.10.2
|
||||
github.com/polarismesh/polaris-go v1.6.1
|
||||
)
|
||||
|
||||
|
||||
@ -4,7 +4,7 @@ go 1.23.0
|
||||
|
||||
require (
|
||||
github.com/ClickHouse/clickhouse-go/v2 v2.0.15
|
||||
github.com/gogf/gf/v2 v2.10.1
|
||||
github.com/gogf/gf/v2 v2.10.2
|
||||
github.com/google/uuid v1.6.0
|
||||
github.com/shopspring/decimal v1.3.1
|
||||
)
|
||||
|
||||
@ -6,7 +6,7 @@ replace github.com/gogf/gf/v2 => ../../../
|
||||
|
||||
require (
|
||||
gitee.com/chunanyong/dm v1.8.12
|
||||
github.com/gogf/gf/v2 v2.10.1
|
||||
github.com/gogf/gf/v2 v2.10.2
|
||||
)
|
||||
|
||||
require (
|
||||
|
||||
@ -4,7 +4,7 @@ go 1.23.0
|
||||
|
||||
require (
|
||||
gitee.com/opengauss/openGauss-connector-go-pq v1.0.7
|
||||
github.com/gogf/gf/v2 v2.10.1
|
||||
github.com/gogf/gf/v2 v2.10.2
|
||||
github.com/google/uuid v1.6.0
|
||||
)
|
||||
|
||||
|
||||
@ -3,8 +3,8 @@ module github.com/gogf/gf/contrib/drivers/mariadb/v2
|
||||
go 1.23.0
|
||||
|
||||
require (
|
||||
github.com/gogf/gf/contrib/drivers/mysql/v2 v2.10.1
|
||||
github.com/gogf/gf/v2 v2.10.1
|
||||
github.com/gogf/gf/contrib/drivers/mysql/v2 v2.10.2
|
||||
github.com/gogf/gf/v2 v2.10.2
|
||||
)
|
||||
|
||||
require (
|
||||
|
||||
@ -3,7 +3,7 @@ module github.com/gogf/gf/contrib/drivers/mssql/v2
|
||||
go 1.23.0
|
||||
|
||||
require (
|
||||
github.com/gogf/gf/v2 v2.10.1
|
||||
github.com/gogf/gf/v2 v2.10.2
|
||||
github.com/microsoft/go-mssqldb v1.7.1
|
||||
)
|
||||
|
||||
|
||||
@ -4,7 +4,7 @@ go 1.23.0
|
||||
|
||||
require (
|
||||
github.com/go-sql-driver/mysql v1.7.1
|
||||
github.com/gogf/gf/v2 v2.10.1
|
||||
github.com/gogf/gf/v2 v2.10.2
|
||||
)
|
||||
|
||||
require (
|
||||
|
||||
@ -3,8 +3,8 @@ module github.com/gogf/gf/contrib/drivers/oceanbase/v2
|
||||
go 1.23.0
|
||||
|
||||
require (
|
||||
github.com/gogf/gf/contrib/drivers/mysql/v2 v2.10.1
|
||||
github.com/gogf/gf/v2 v2.10.1
|
||||
github.com/gogf/gf/contrib/drivers/mysql/v2 v2.10.2
|
||||
github.com/gogf/gf/v2 v2.10.2
|
||||
)
|
||||
|
||||
require (
|
||||
|
||||
@ -3,7 +3,7 @@ module github.com/gogf/gf/contrib/drivers/oracle/v2
|
||||
go 1.23.0
|
||||
|
||||
require (
|
||||
github.com/gogf/gf/v2 v2.10.1
|
||||
github.com/gogf/gf/v2 v2.10.2
|
||||
github.com/sijms/go-ora/v2 v2.7.10
|
||||
)
|
||||
|
||||
|
||||
@ -3,7 +3,7 @@ module github.com/gogf/gf/contrib/drivers/pgsql/v2
|
||||
go 1.23.0
|
||||
|
||||
require (
|
||||
github.com/gogf/gf/v2 v2.10.1
|
||||
github.com/gogf/gf/v2 v2.10.2
|
||||
github.com/google/uuid v1.6.0
|
||||
github.com/lib/pq v1.10.9
|
||||
)
|
||||
|
||||
@ -4,7 +4,7 @@ go 1.23.0
|
||||
|
||||
require (
|
||||
github.com/glebarez/go-sqlite v1.21.2
|
||||
github.com/gogf/gf/v2 v2.10.1
|
||||
github.com/gogf/gf/v2 v2.10.2
|
||||
)
|
||||
|
||||
require (
|
||||
|
||||
@ -3,7 +3,7 @@ module github.com/gogf/gf/contrib/drivers/sqlitecgo/v2
|
||||
go 1.23.0
|
||||
|
||||
require (
|
||||
github.com/gogf/gf/v2 v2.10.1
|
||||
github.com/gogf/gf/v2 v2.10.2
|
||||
github.com/mattn/go-sqlite3 v1.14.17
|
||||
)
|
||||
|
||||
|
||||
@ -3,8 +3,8 @@ module github.com/gogf/gf/contrib/drivers/tidb/v2
|
||||
go 1.23.0
|
||||
|
||||
require (
|
||||
github.com/gogf/gf/contrib/drivers/mysql/v2 v2.10.1
|
||||
github.com/gogf/gf/v2 v2.10.1
|
||||
github.com/gogf/gf/contrib/drivers/mysql/v2 v2.10.2
|
||||
github.com/gogf/gf/v2 v2.10.2
|
||||
)
|
||||
|
||||
require (
|
||||
|
||||
@ -3,7 +3,7 @@ module github.com/gogf/gf/contrib/metric/otelmetric/v2
|
||||
go 1.23.0
|
||||
|
||||
require (
|
||||
github.com/gogf/gf/v2 v2.10.1
|
||||
github.com/gogf/gf/v2 v2.10.2
|
||||
github.com/prometheus/client_golang v1.23.2
|
||||
go.opentelemetry.io/contrib/instrumentation/runtime v0.63.0
|
||||
go.opentelemetry.io/otel v1.38.0
|
||||
|
||||
@ -3,7 +3,7 @@ module github.com/gogf/gf/contrib/nosql/redis/v2
|
||||
go 1.23.0
|
||||
|
||||
require (
|
||||
github.com/gogf/gf/v2 v2.10.1
|
||||
github.com/gogf/gf/v2 v2.10.2
|
||||
github.com/redis/go-redis/v9 v9.12.1
|
||||
go.opentelemetry.io/otel v1.38.0
|
||||
go.opentelemetry.io/otel/trace v1.38.0
|
||||
|
||||
@ -3,7 +3,7 @@ module github.com/gogf/gf/contrib/registry/consul/v2
|
||||
go 1.23.0
|
||||
|
||||
require (
|
||||
github.com/gogf/gf/v2 v2.10.1
|
||||
github.com/gogf/gf/v2 v2.10.2
|
||||
github.com/hashicorp/consul/api v1.26.1
|
||||
)
|
||||
|
||||
|
||||
@ -3,7 +3,7 @@ module github.com/gogf/gf/contrib/registry/etcd/v2
|
||||
go 1.23.0
|
||||
|
||||
require (
|
||||
github.com/gogf/gf/v2 v2.10.1
|
||||
github.com/gogf/gf/v2 v2.10.2
|
||||
go.etcd.io/etcd/client/v3 v3.5.17
|
||||
google.golang.org/grpc v1.59.0
|
||||
)
|
||||
|
||||
@ -2,7 +2,7 @@ module github.com/gogf/gf/contrib/registry/file/v2
|
||||
|
||||
go 1.23.0
|
||||
|
||||
require github.com/gogf/gf/v2 v2.10.1
|
||||
require github.com/gogf/gf/v2 v2.10.2
|
||||
|
||||
require (
|
||||
github.com/BurntSushi/toml v1.5.0 // indirect
|
||||
|
||||
@ -3,7 +3,7 @@ module github.com/gogf/gf/contrib/registry/nacos/v2
|
||||
go 1.23.0
|
||||
|
||||
require (
|
||||
github.com/gogf/gf/v2 v2.10.1
|
||||
github.com/gogf/gf/v2 v2.10.2
|
||||
github.com/nacos-group/nacos-sdk-go/v2 v2.3.5
|
||||
)
|
||||
|
||||
|
||||
@ -3,7 +3,7 @@ module github.com/gogf/gf/contrib/registry/polaris/v2
|
||||
go 1.23.0
|
||||
|
||||
require (
|
||||
github.com/gogf/gf/v2 v2.10.1
|
||||
github.com/gogf/gf/v2 v2.10.2
|
||||
github.com/polarismesh/polaris-go v1.6.1
|
||||
)
|
||||
|
||||
|
||||
@ -4,7 +4,7 @@ go 1.23.0
|
||||
|
||||
require (
|
||||
github.com/go-zookeeper/zk v1.0.3
|
||||
github.com/gogf/gf/v2 v2.10.1
|
||||
github.com/gogf/gf/v2 v2.10.2
|
||||
golang.org/x/sync v0.16.0
|
||||
)
|
||||
|
||||
|
||||
@ -3,8 +3,8 @@ module github.com/gogf/gf/contrib/rpc/grpcx/v2
|
||||
go 1.23.0
|
||||
|
||||
require (
|
||||
github.com/gogf/gf/contrib/registry/file/v2 v2.10.1
|
||||
github.com/gogf/gf/v2 v2.10.1
|
||||
github.com/gogf/gf/contrib/registry/file/v2 v2.10.2
|
||||
github.com/gogf/gf/v2 v2.10.2
|
||||
go.opentelemetry.io/otel v1.38.0
|
||||
go.opentelemetry.io/otel/trace v1.38.0
|
||||
google.golang.org/grpc v1.64.1
|
||||
|
||||
@ -2,7 +2,7 @@ module github.com/gogf/gf/contrib/sdk/httpclient/v2
|
||||
|
||||
go 1.23.0
|
||||
|
||||
require github.com/gogf/gf/v2 v2.10.1
|
||||
require github.com/gogf/gf/v2 v2.10.2
|
||||
|
||||
require (
|
||||
github.com/BurntSushi/toml v1.5.0 // indirect
|
||||
|
||||
@ -3,7 +3,7 @@ module github.com/gogf/gf/contrib/trace/otlpgrpc/v2
|
||||
go 1.23.0
|
||||
|
||||
require (
|
||||
github.com/gogf/gf/v2 v2.10.1
|
||||
github.com/gogf/gf/v2 v2.10.2
|
||||
go.opentelemetry.io/otel v1.38.0
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.38.0
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracegrpc v1.38.0
|
||||
|
||||
@ -3,7 +3,7 @@ module github.com/gogf/gf/contrib/trace/otlphttp/v2
|
||||
go 1.23.0
|
||||
|
||||
require (
|
||||
github.com/gogf/gf/v2 v2.10.1
|
||||
github.com/gogf/gf/v2 v2.10.2
|
||||
go.opentelemetry.io/otel v1.38.0
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace v1.38.0
|
||||
go.opentelemetry.io/otel/exporters/otlp/otlptrace/otlptracehttp v1.38.0
|
||||
|
||||
@ -2,5 +2,5 @@ package gf
|
||||
|
||||
const (
|
||||
// VERSION is the current GoFrame version.
|
||||
VERSION = "v2.10.1"
|
||||
VERSION = "v2.10.2"
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user