Skip to content

Commit 44dbc3e

Browse files
authored
Merge pull request #47 from devfeel/develop
新增泛型Mapper支持,提供类型安全的映射函数。
2 parents d2a0aa1 + 74441e6 commit 44dbc3e

File tree

2 files changed

+14
-17
lines changed

2 files changed

+14
-17
lines changed

.github/workflows/go.yml

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,25 @@
11
name: Go
2-
on: [push]
3-
jobs:
2+
on: [push, pull_request]
43

4+
jobs:
55
build:
66
name: Build
77
runs-on: ubuntu-latest
88
steps:
9+
- name: Check out code
10+
uses: actions/checkout@v4
911

10-
- name: Set up Go 1.12
11-
uses: actions/setup-go@v1
12+
- name: Set up Go
13+
uses: actions/setup-go@v5
1214
with:
13-
go-version: 1.12
14-
id: go
15-
16-
- name: Check out code into the Go module directory
17-
uses: actions/checkout@v1
15+
go-version: '1.21'
16+
cache: true
1817

1918
- name: Get dependencies
20-
run: |
21-
go get -v -t -d ./...
22-
if [ -f Gopkg.toml ]; then
23-
curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
24-
dep ensure
25-
fi
19+
run: go mod download
2620

2721
- name: Build
28-
run: go build -v .
22+
run: go build -v ./...
23+
24+
- name: Test
25+
run: go test -v -race ./...

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module github.com/devfeel/mapper
22

3-
go 1.22.2
3+
go 1.21

0 commit comments

Comments
 (0)