Commit f9b6c7d
committed
refactor(user): interface-ize UserService and implement with userService
- Define UserService interface for better abstraction and testability- Create userService struct to implement UserService interface
- Update client.go to use new UserService interface and NewUserService function
- Improve code organization and readability in api_user.go
Signed-off-by: Flc <[email protected]>1 parent 3e1ea66 commit f9b6c7d
2 files changed
+27
-14
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
9 | | - | |
10 | | - | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
11 | 25 | | |
12 | 26 | | |
13 | | - | |
14 | | - | |
| 27 | + | |
15 | 28 | | |
16 | 29 | | |
17 | 30 | | |
18 | | - | |
19 | | - | |
20 | | - | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
21 | 37 | | |
22 | 38 | | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
| 39 | + | |
27 | 40 | | |
28 | 41 | | |
29 | 42 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | | - | |
| 48 | + | |
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
| |||
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
94 | | - | |
| 94 | + | |
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
| |||
0 commit comments