Skip to content

Commit c688d68

Browse files
committed
fix(项目): 修复配置无法加载的问题
1 parent d1f78f5 commit c688d68

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

internal/config/http.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
package config
22

33
import (
4-
"github.com/harluo/boot"
4+
"github.com/harluo/config"
55
)
66

77
type Http struct {
8-
Client *Client `json:"client,omitempty" validate:"required"`
8+
Client *Client `default:"{}" json:"client,omitempty" validate:"required"`
99
}
1010

11-
func newHttp(config *boot.Config) (http *Http, err error) {
11+
func newHttp(config *config.Getter) (http *Http, err error) {
1212
http = new(Http)
13-
err = config.Build().Get(&struct {
13+
err = config.Get(&struct {
1414
Http *Http `json:"http,omitempty" validate:"required"`
1515
}{
1616
Http: http,

0 commit comments

Comments
 (0)