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

mlange-42 / modo / 12729582532

12 Jan 2025 02:14AM CUT coverage: 12.644%. Remained the same
12729582532

Pull #19

github

web-flow
Merge e5dfae079 into 66b79d212
Pull Request #19: Navigation and top-level headings use inline code style

0 of 6 new or added lines in 1 file covered. (0.0%)

33 of 261 relevant lines covered (12.64%)

0.8 hits per line

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

31.03
/document/document.go
1
package document
2

3
import (
4
        "bytes"
5
        "encoding/json"
6
)
7

8
type Docs struct {
9
        Decl    Package
10
        Version string
11
}
12

13
type Package struct {
14
        Kind
15
        Name
16
        Path
17
        Description string
18
        Summary     string
19
        Modules     []*Module
20
        Packages    []*Package
21
}
22

23
type Module struct {
24
        Kind
25
        Name
26
        Path
27
        Summary     string
28
        Description string
29
        Aliases     []*Alias
30
        Functions   []*Function
31
        Structs     []*Struct
32
        Traits      []*Trait
33
}
34

35
type Alias struct {
36
        Kind
37
        Name
38
        Description string
39
        Summary     string
40
        Value       string
41
        Deprecated  string
42
}
43

44
type Struct struct {
45
        Kind
46
        Name
47
        Path
48
        Description  string
49
        Summary      string
50
        Aliases      []*Alias
51
        Constraints  string
52
        Convention   string
53
        Deprecated   string
54
        Fields       []*Field
55
        Functions    []*Function
56
        Parameters   []*Parameter
57
        ParentTraits []string
58
        Signature    string
59
}
60

61
type Function struct {
62
        Kind
63
        Name
64
        Path
65
        Description          string
66
        Summary              string
67
        Args                 []*Arg
68
        Overloads            []*Function
69
        Async                bool
70
        Constraints          string
71
        Deprecated           string
72
        IsDef                bool
73
        IsStatic             bool
74
        IsImplicitConversion bool
75
        Raises               bool
76
        RaisesDoc            string
77
        ReturnType           string
78
        ReturnsDoc           string
79
        Signature            string
80
        Parameters           []*Parameter
81
}
82

83
type Field struct {
84
        Kind
85
        Name
86
        Description string
87
        Summary     string
88
        Type        string
89
}
90

91
type Trait struct {
92
        Kind
93
        Name
94
        Path
95
        Description  string
96
        Summary      string
97
        Fields       []*Field
98
        Functions    []*Function
99
        ParentTraits []string
100
        Deprecated   string
101
}
102

103
type Arg struct {
104
        Kind
105
        Name
106
        Description string
107
        Convention  string
108
        Type        string
109
        PassingKind string
110
        Default     string
111
}
112

113
type Parameter struct {
114
        Kind
115
        Name
116
        Description string
117
        Type        string
118
        PassingKind string
119
        Default     string
120
}
121

122
func FromJson(data []byte) (*Docs, error) {
1✔
123
        reader := bytes.NewReader(data)
1✔
124
        dec := json.NewDecoder(reader)
1✔
125
        dec.DisallowUnknownFields()
1✔
126

1✔
127
        var docs Docs
1✔
128

1✔
129
        if err := dec.Decode(&docs); err != nil {
1✔
130
                return nil, err
×
131
        }
×
132

133
        return &docs, nil
1✔
134
}
135

136
type Kinded interface {
137
        GetKind() string
138
}
139

140
type Named interface {
141
        GetName() string
142
}
143

144
type Pathed interface {
145
        GetPath() string
146
        SetPath(p string)
147
}
148

149
type Kind struct {
150
        Kind string
151
}
152

153
func NewKind(kind string) Kind {
×
154
        return Kind{Kind: kind}
×
155
}
×
156

157
func (k *Kind) GetKind() string {
×
158
        return k.Kind
×
159
}
×
160

161
type Name struct {
162
        Name string
163
}
164

165
func NewName(name string) Name {
×
166
        return Name{Name: name}
×
167
}
×
168

169
func (k *Name) GetName() string {
×
170
        return k.Name
×
171
}
×
172

173
type Path struct {
174
        Path string
175
}
176

177
func (p *Path) GetPath() string {
×
178
        return p.Path
×
179
}
×
180

181
func (p *Path) SetPath(path string) {
×
182
        p.Path = path
×
183
}
×
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