File tree Expand file tree Collapse file tree 2 files changed +8
-10
lines changed Expand file tree Collapse file tree 2 files changed +8
-10
lines changed Original file line number Diff line number Diff line change 9
9
fail-fast : false
10
10
matrix :
11
11
version : ["1.21.x", "1.22.x", "1.23.x", "1.24.x"]
12
- services :
13
- redis :
14
- image : redis
15
- ports :
16
- - 6379:6379
12
+ # services:
13
+ # redis:
14
+ # image: redis
15
+ # ports:
16
+ # - 6379:6379
17
17
steps :
18
18
- uses : actions/checkout@v4
19
19
- uses : actions/setup-go@v5
20
20
with :
21
21
go-version : " stable"
22
- - name : Install SQLite
23
- run : sudo apt-get update && sudo apt-get install -y sqlite3 libsqlite3-dev
22
+ # - name: Install SQLite
23
+ # run: sudo apt-get update && sudo apt-get install -y sqlite3 libsqlite3-dev
24
24
- name : Gather dependencies
25
25
run : go mod download
26
26
- name : Run coverage
Original file line number Diff line number Diff line change @@ -301,9 +301,7 @@ NamedProvider 接口定义了一个`Provide`
301
301
> Inject (tagConf string , field reflect.StructField , fieldValue reflect.Value ) error
302
302
> }
303
303
> ` ` `
304
- > 它是一个接口,它只有一个方法` InjectStructField`
305
- >
306
- ,这个方法接收三个参数,第一个参数是v,第二个参数是tagConf,第三个参数是t,t是reflect.Type类型,用于获取字段的类型,然后根据字段的类型返回对应的值。它的应用场景是,需要通过一个Provider给组件注入多个类型的值。
304
+ > 它是一个接口,它只有一个方法` InjectStructField` ,这个方法接收三个参数,第一个参数是v,第二个参数是tagConf,第三个参数是t,t是reflect.Type类型,用于获取字段的类型,然后根据字段的类型返回对应的值。它的应用场景是,需要通过一个Provider给组件注入多个类型的值。
307
305
308
306
从接口的定义上可以看到,Provider、NoneParamProvider、NamedProvider和StructFieldInjector都是Goner的子接口,要实现他们都必须嵌入
309
307
` gone.Flag ` 。他们的用途都是将第三方的值提给Gone框架,让框架来进行依赖注入。
You can’t perform that action at this time.
0 commit comments