Open YoungBoyGod opened 1 month ago
go 1.22.4 amd64
2.7.1
Option Yes
i want to get client instance,but get null.
test one: ` package gerritLogicV1
import ( "HaiTangOps/internal/model/gerritModelV1" "HaiTangOps/internal/service" "context" //"github.com/andygrunwald/go-gerrit" "github.com/gogf/gf/v2/frame/g" "golang.org/x/build/gerrit" )
type sGerritV1 struct{}
func New() *sGerritV1 { return &sGerritV1{} }
func init() { service.RegisterGerritV1(New()) } func (s sGerritV1) GetGerritInstance(ctx context.Context, input gerritModelV1.GetGerritInstanceInput) (output *gerrit.Client) { // todo 需要增加登录gerrit 的功能模块 g.Log().Debug(context.Background(), "input", input) // 1.输入地址,用户名密码 client := gerrit.NewClient(input.Url, gerrit.BasicAuth(input.Username, input.Password)) g.Log("gerrit").Debug(ctx, "output", client) return client
}
2024-07-23 20:49:34.763 [DEBU] input {"Username":"aadmin","Password":"admin","Url":"http://192.168.10.211:8080"} 2024-07-23 20:49:34.763 [DEBU] {bc25aeb279d8e41780d46416e24a9e43} output {"HTTPClient":null} 2024-07-23 20:49:34.763 [INFO] {bc25aeb279d8e41780d46416e24a9e43} {"HTTPClient":null} ` test two:
i donnt kown why i cannot get client instance use gf i try use gin ,it is ok。 so what is wrong ?
i want get the instance in gf
it seem run to a loop
Go version
go 1.22.4 amd64
GoFrame version
2.7.1
Can this bug be reproduced with the latest release?
Option Yes
What did you do?
i want to get client instance,but get null.
test one: ` package gerritLogicV1
import ( "HaiTangOps/internal/model/gerritModelV1" "HaiTangOps/internal/service" "context" //"github.com/andygrunwald/go-gerrit" "github.com/gogf/gf/v2/frame/g" "golang.org/x/build/gerrit" )
type sGerritV1 struct{}
func New() *sGerritV1 { return &sGerritV1{} }
func init() { service.RegisterGerritV1(New()) } func (s sGerritV1) GetGerritInstance(ctx context.Context, input gerritModelV1.GetGerritInstanceInput) (output *gerrit.Client) { // todo 需要增加登录gerrit 的功能模块 g.Log().Debug(context.Background(), "input", input) // 1.输入地址,用户名密码 client := gerrit.NewClient(input.Url, gerrit.BasicAuth(input.Username, input.Password)) g.Log("gerrit").Debug(ctx, "output", client) return client
}
2024-07-23 20:49:34.763 [DEBU] input {"Username":"aadmin","Password":"admin","Url":"http://192.168.10.211:8080"} 2024-07-23 20:49:34.763 [DEBU] {bc25aeb279d8e41780d46416e24a9e43} output {"HTTPClient":null} 2024-07-23 20:49:34.763 [INFO] {bc25aeb279d8e41780d46416e24a9e43} {"HTTPClient":null} ` test two:
What did you see happen?
i donnt kown why i cannot get client instance use gf i try use gin ,it is ok。 so what is wrong ?
What did you expect to see?
i want get the instance in gf