File tree 2 files changed +15
-19
lines changed
2 files changed +15
-19
lines changed Original file line number Diff line number Diff line change 1
1
linters-settings :
2
- govet :
3
- check-shadowing : true
4
- golint :
5
- min-confidence : 0
6
2
gocyclo :
7
3
min-complexity : 45
8
- maligned :
9
- suggest-new : true
10
4
dupl :
11
5
threshold : 200
12
6
goconst :
@@ -16,7 +10,6 @@ linters-settings:
16
10
linters :
17
11
enable-all : true
18
12
disable :
19
- - maligned
20
13
- unparam
21
14
- lll
22
15
- gochecknoinits
@@ -29,17 +22,13 @@ linters:
29
22
- wrapcheck
30
23
- testpackage
31
24
- nlreturn
32
- - gomnd
33
- - exhaustivestruct
34
- - goerr113
35
25
- errorlint
36
26
- nestif
37
27
- godot
38
28
- gofumpt
39
29
- paralleltest
40
30
- tparallel
41
31
- thelper
42
- - ifshort
43
32
- exhaustruct
44
33
- varnamelen
45
34
- gci
@@ -52,10 +41,15 @@ linters:
52
41
- forcetypeassert
53
42
- cyclop
54
43
# deprecated linters
55
- - deadcode
56
- - interfacer
57
- - scopelint
58
- - varcheck
59
- - structcheck
60
- - golint
61
- - nosnakecase
44
+ # - deadcode
45
+ # - interfacer
46
+ # - scopelint
47
+ # - varcheck
48
+ # - structcheck
49
+ # - golint
50
+ # - nosnakecase
51
+ # - maligned
52
+ # - goerr113
53
+ # - ifshort
54
+ # - gomnd
55
+ # - exhaustivestruct
Original file line number Diff line number Diff line change @@ -38,6 +38,8 @@ const (
38
38
fragmentRune = `#`
39
39
)
40
40
41
+ var ErrChildURL = errors .New ("child url is nil" )
42
+
41
43
// New creates a new reference for the given string
42
44
func New (jsonReferenceString string ) (Ref , error ) {
43
45
@@ -144,7 +146,7 @@ func (r *Ref) Inherits(child Ref) (*Ref, error) {
144
146
childURL := child .GetURL ()
145
147
parentURL := r .GetURL ()
146
148
if childURL == nil {
147
- return nil , errors . New ( "child url is nil" )
149
+ return nil , ErrChildURL
148
150
}
149
151
if parentURL == nil {
150
152
return & child , nil
You can’t perform that action at this time.
0 commit comments