• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

yyle88 / goi18n / 15066836015

16 May 2025 10:54AM UTC coverage: 48.496% (+21.9%) from 26.619%
15066836015

push

github

yangyile
补充测试内容

120 of 297 new or added lines in 10 files covered. (40.4%)

52 existing lines in 1 file now uncovered.

258 of 532 relevant lines covered (48.5%)

30.44 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

15.0
/internal/examples/example2/example2message/message.go
1
package example2message
2

3
import "github.com/nicksnyder/go-i18n/v2/i18n"
4

5
type ActiveUsersParam struct {
6
        Count any
7
}
8

9
func (p *ActiveUsersParam) GetTemplateValues() map[string]any {
2✔
10
        res := make(map[string]any)
2✔
11
        if p.Count != nil {
4✔
12
                res["count"] = p.Count
2✔
13
        }
2✔
14
        return res
2✔
15
}
16

17
func NewActiveUsers(data *ActiveUsersParam) (string, map[string]any) {
2✔
18
        return "ACTIVE_USERS", data.GetTemplateValues()
2✔
19
}
2✔
20

NEW
21
func I18nActiveUsers(data *ActiveUsersParam) *i18n.LocalizeConfig {
×
NEW
22
        return &i18n.LocalizeConfig{
×
NEW
23
                MessageID:    "ACTIVE_USERS",
×
NEW
24
                TemplateData: data.GetTemplateValues(),
×
NEW
25
        }
×
NEW
26
}
×
27

28
type CompletedTasksParam struct {
29
        Count any
30
}
31

NEW
32
func (p *CompletedTasksParam) GetTemplateValues() map[string]any {
×
NEW
33
        res := make(map[string]any)
×
NEW
34
        if p.Count != nil {
×
NEW
35
                res["count"] = p.Count
×
NEW
36
        }
×
NEW
37
        return res
×
38
}
39

NEW
40
func NewCompletedTasks(data *CompletedTasksParam) (string, map[string]any) {
×
NEW
41
        return "COMPLETED_TASKS", data.GetTemplateValues()
×
NEW
42
}
×
43

NEW
44
func I18nCompletedTasks(data *CompletedTasksParam) *i18n.LocalizeConfig {
×
NEW
45
        return &i18n.LocalizeConfig{
×
NEW
46
                MessageID:    "COMPLETED_TASKS",
×
NEW
47
                TemplateData: data.GetTemplateValues(),
×
NEW
48
        }
×
NEW
49
}
×
50

51
type OpenIssuesParam struct {
52
        Count any
53
}
54

NEW
55
func (p *OpenIssuesParam) GetTemplateValues() map[string]any {
×
NEW
56
        res := make(map[string]any)
×
NEW
57
        if p.Count != nil {
×
NEW
58
                res["count"] = p.Count
×
NEW
59
        }
×
NEW
60
        return res
×
61
}
62

NEW
63
func NewOpenIssues(data *OpenIssuesParam) (string, map[string]any) {
×
NEW
64
        return "OPEN_ISSUES", data.GetTemplateValues()
×
NEW
65
}
×
66

NEW
67
func I18nOpenIssues(data *OpenIssuesParam) *i18n.LocalizeConfig {
×
NEW
68
        return &i18n.LocalizeConfig{
×
NEW
69
                MessageID:    "OPEN_ISSUES",
×
NEW
70
                TemplateData: data.GetTemplateValues(),
×
NEW
71
        }
×
NEW
72
}
×
73

74
type PendingReviewsParam struct {
75
        Count any
76
}
77

NEW
78
func (p *PendingReviewsParam) GetTemplateValues() map[string]any {
×
NEW
79
        res := make(map[string]any)
×
NEW
80
        if p.Count != nil {
×
NEW
81
                res["count"] = p.Count
×
NEW
82
        }
×
NEW
83
        return res
×
84
}
85

NEW
86
func NewPendingReviews(data *PendingReviewsParam) (string, map[string]any) {
×
NEW
87
        return "PENDING_REVIEWS", data.GetTemplateValues()
×
NEW
88
}
×
89

NEW
90
func I18nPendingReviews(data *PendingReviewsParam) *i18n.LocalizeConfig {
×
NEW
91
        return &i18n.LocalizeConfig{
×
NEW
92
                MessageID:    "PENDING_REVIEWS",
×
NEW
93
                TemplateData: data.GetTemplateValues(),
×
NEW
94
        }
×
NEW
95
}
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc