Skip to content

Commit 6a1e629

Browse files
author
dapeng
committed
chore: simplify GitHub Actions workflow configuration
Remove commented-out Redis and SQLite dependencies from the CI workflow to streamline the testing process and reduce complexity
1 parent 0a7dabe commit 6a1e629

File tree

2 files changed

+8
-10
lines changed

2 files changed

+8
-10
lines changed

.github/workflows/go.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,18 +9,18 @@ jobs:
99
fail-fast: false
1010
matrix:
1111
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
1717
steps:
1818
- uses: actions/checkout@v4
1919
- uses: actions/setup-go@v5
2020
with:
2121
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
2424
- name: Gather dependencies
2525
run: go mod download
2626
- name: Run coverage

docs/v2-update.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -301,9 +301,7 @@ NamedProvider 接口定义了一个`Provide`
301301
> Inject(tagConf string, field reflect.StructField, fieldValue reflect.Value) error
302302
> }
303303
> ```
304-
> 它是一个接口,它只有一个方法`InjectStructField`
305-
>
306-
,这个方法接收三个参数,第一个参数是v,第二个参数是tagConf,第三个参数是t,t是reflect.Type类型,用于获取字段的类型,然后根据字段的类型返回对应的值。它的应用场景是,需要通过一个Provider给组件注入多个类型的值。
304+
> 它是一个接口,它只有一个方法`InjectStructField`,这个方法接收三个参数,第一个参数是v,第二个参数是tagConf,第三个参数是t,t是reflect.Type类型,用于获取字段的类型,然后根据字段的类型返回对应的值。它的应用场景是,需要通过一个Provider给组件注入多个类型的值。
307305
308306
从接口的定义上可以看到,Provider、NoneParamProvider、NamedProvider和StructFieldInjector都是Goner的子接口,要实现他们都必须嵌入
309307
`gone.Flag`。他们的用途都是将第三方的值提给Gone框架,让框架来进行依赖注入。

0 commit comments

Comments
 (0)