File tree Expand file tree Collapse file tree 6 files changed +21
-20
lines changed Expand file tree Collapse file tree 6 files changed +21
-20
lines changed Original file line number Diff line number Diff line change @@ -31,6 +31,7 @@ linters:
31
31
- gocognit
32
32
- gocyclo
33
33
- gocritic
34
+ - godot
34
35
- godox
35
36
- goheader
36
37
- gomoddirectives
@@ -40,6 +41,17 @@ linters:
40
41
- gosmopolitan
41
42
- govet
42
43
- grouper
44
+ - iface
45
+ - importas
46
+ - ineffassign
47
+ - interfacebloat
48
+ - intrange
49
+ - loggercheck
50
+ - maintidx
51
+ - makezero
52
+ - mirror
53
+ - misspell
54
+ - musttag
43
55
- staticcheck
44
56
45
57
disable :
@@ -52,22 +64,11 @@ linters:
52
64
- funlen
53
65
- gochecknoglobals
54
66
- goconst
55
- - godot
56
- - iface
57
- - importas
58
67
- inamedparam
59
- - ineffassign
60
- - interfacebloat
61
- - intrange
62
68
- ireturn
63
69
- lll
64
- - loggercheck
65
- - maintidx
66
- - makezero
67
- - mirror
68
- - misspell
69
70
- mnd
70
- - musttag
71
+
71
72
- nakedret
72
73
- nestif
73
74
- nilerr
Original file line number Diff line number Diff line change 7
7
"github.com/iancoleman/strcase"
8
8
)
9
9
10
- // Attribute defines single XML attribute
10
+ // Attribute defines single XML attribute.
11
11
type Attribute struct {
12
12
XMLName xml.Name `xml:"http://www.w3.org/2001/XMLSchema attribute"`
13
13
Name string `xml:"name,attr"`
@@ -35,7 +35,7 @@ func (a *Attribute) Documentation() string {
35
35
return a .Annotation .Documentations [0 ].GetContent ()
36
36
}
37
37
38
- // Public Go Name of this struct item
38
+ // Public Go Name of this struct item.
39
39
func (a * Attribute ) GoName () string {
40
40
name := a .Name
41
41
if a .Name == "" {
Original file line number Diff line number Diff line change 6
6
"github.com/iancoleman/strcase"
7
7
)
8
8
9
- // Internal XSD reference. Examples: "xml:lang", "cpe2:platform-specification"
9
+ // Internal XSD reference. Examples: "xml:lang", "cpe2:platform-specification".
10
10
type reference string
11
11
12
12
func (ref reference ) NsPrefix () string {
Original file line number Diff line number Diff line change 8
8
"github.com/iancoleman/strcase"
9
9
)
10
10
11
- // Element defines single XML element
11
+ // Element defines single XML element.
12
12
type Element struct {
13
13
XMLName xml.Name `xml:"http://www.w3.org/2001/XMLSchema element"`
14
14
Name string `xml:"name,attr"`
Original file line number Diff line number Diff line change @@ -7,13 +7,13 @@ import (
7
7
"github.com/iancoleman/strcase"
8
8
)
9
9
10
- // Attribute defines single XML attribute
10
+ // Attribute defines single XML attribute.
11
11
type Enumeration struct {
12
12
XMLName xml.Name `xml:"http://www.w3.org/2001/XMLSchema enumeration"`
13
13
Value string `xml:"value,attr"`
14
14
}
15
15
16
- // Public Go Name of this struct item
16
+ // Public Go Name of this struct item.
17
17
func (e * Enumeration ) GoName () string {
18
18
return strcase .ToCamel (strings .ToLower (e .Value ))
19
19
}
Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ import (
11
11
"golang.org/x/net/html/charset"
12
12
)
13
13
14
- // Schema is the root XSD element
14
+ // Schema is the root XSD element.
15
15
type Schema struct {
16
16
XMLName xml.Name `xml:"http://www.w3.org/2001/XMLSchema schema"`
17
17
Xmlns Xmlns `xml:"-"`
@@ -294,7 +294,7 @@ func (sch *Schema) registerImportedModule(module *Schema) {
294
294
sch .importedModules [module .GoPackageName ()] = module
295
295
}
296
296
297
- // Some elements are not defined at the top-level, rather these are inlined in the complexType definitions
297
+ // Some elements are not defined at the top-level, rather these are inlined in the complexType definitions.
298
298
func (sch * Schema ) registerInlinedElement (el * Element , parentElement * Element ) {
299
299
if sch .isElementInlined (el ) {
300
300
if el .Name == "" {
You can’t perform that action at this time.
0 commit comments