File tree Expand file tree Collapse file tree 12 files changed +764
-188
lines changed
onex-cacheserver/app/options
onex-nightwatch/app/options
onex-usercenter/app/options Expand file tree Collapse file tree 12 files changed +764
-188
lines changed Original file line number Diff line number Diff line change @@ -26,8 +26,8 @@ type ServerOptions struct {
26
26
Logging * log.Options `json:"log" mapstructure:"log"`
27
27
}
28
28
29
- // Ensure ServerOptions implements the app.CliOptions interface.
30
- var _ app.CliOptions = (* ServerOptions )(nil )
29
+ // Ensure ServerOptions implements the app.NamedFlagSetOptions interface.
30
+ var _ app.NamedFlagSetOptions = (* ServerOptions )(nil )
31
31
32
32
// NewServerOptions creates a ServerOptions instance with default values.
33
33
func NewServerOptions () * ServerOptions {
Original file line number Diff line number Diff line change @@ -48,8 +48,8 @@ type ServerOptions struct {
48
48
Log * log.Options `json:"log" mapstructure:"log"`
49
49
}
50
50
51
- // Ensure ServerOptions implements the app.CliOptions interface.
52
- var _ app.CliOptions = (* ServerOptions )(nil )
51
+ // Ensure ServerOptions implements the app.NamedFlagSetOptions interface.
52
+ var _ app.NamedFlagSetOptions = (* ServerOptions )(nil )
53
53
54
54
// NewServerOptions creates a ServerOptions instance with default values.
55
55
func NewServerOptions () * ServerOptions {
Original file line number Diff line number Diff line change @@ -47,8 +47,8 @@ type ServerOptions struct {
47
47
Log * log.Options `json:"log" mapstructure:"log"`
48
48
}
49
49
50
- // Ensure ServerOptions implements the app.CliOptions interface.
51
- var _ app.CliOptions = (* ServerOptions )(nil )
50
+ // Ensure ServerOptions implements the app.NamedFlagSetOptions interface.
51
+ var _ app.NamedFlagSetOptions = (* ServerOptions )(nil )
52
52
53
53
// NewServerOptions creates a ServerOptions instance with default values.
54
54
func NewServerOptions () * ServerOptions {
Original file line number Diff line number Diff line change @@ -31,8 +31,8 @@ type ServerOptions struct {
31
31
FeatureGates map [string ]bool `json:"feature-gates"`
32
32
}
33
33
34
- // Ensure ServerOptions implements the app.CliOptions interface.
35
- var _ app.CliOptions = (* ServerOptions )(nil )
34
+ // Ensure ServerOptions implements the app.NamedFlagSetOptions interface.
35
+ var _ app.NamedFlagSetOptions = (* ServerOptions )(nil )
36
36
37
37
// NewServerOptions creates a ServerOptions instance with default values.
38
38
func NewServerOptions () * ServerOptions {
Original file line number Diff line number Diff line change @@ -41,8 +41,8 @@ type ServerOptions struct {
41
41
Log * log.Options `json:"log" mapstructure:"log"`
42
42
}
43
43
44
- // Ensure ServerOptions implements the app.CliOptions interface.
45
- var _ app.CliOptions = (* ServerOptions )(nil )
44
+ // Ensure ServerOptions implements the app.NamedFlagSetOptions interface.
45
+ var _ app.NamedFlagSetOptions = (* ServerOptions )(nil )
46
46
47
47
// NewServerOptions creates a ServerOptions instance with default values.
48
48
func NewServerOptions () * ServerOptions {
Original file line number Diff line number Diff line change @@ -57,8 +57,8 @@ type ServerOptions struct {
57
57
Log * log.Options `json:"log" mapstructure:"log"`
58
58
}
59
59
60
- // Ensure ServerOptions implements the app.CliOptions interface.
61
- var _ app.CliOptions = (* ServerOptions )(nil )
60
+ // Ensure ServerOptions implements the app.NamedFlagSetOptions interface.
61
+ var _ app.NamedFlagSetOptions = (* ServerOptions )(nil )
62
62
63
63
// NewServerOptions creates a ServerOptions instance with default values.
64
64
func NewServerOptions () * ServerOptions {
Load Diff Large diffs are not rendered by default.
Load Diff Large diffs are not rendered by default.
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ import (
12
12
func (h * Handler ) CreateBlock (c * gin.Context ) {
13
13
var rq v1.CreateBlockRequest
14
14
if err := core .ShouldBindJSON (c , & rq ); err != nil {
15
- core .WriteResponse (c , err , nil )
15
+ core .WriteResponse (c , nil , err )
16
16
return
17
17
}
18
18
@@ -22,5 +22,5 @@ func (h *Handler) CreateBlock(c *gin.Context) {
22
22
23
23
// ListBlock retrieves a list of blocks based on query parameters.
24
24
func (h * Handler ) ListBlock (c * gin.Context ) {
25
- core .WriteResponse (c , nil , h .bs .List ())
25
+ core .WriteResponse (c , h .bs .List (), nil )
26
26
}
Original file line number Diff line number Diff line change @@ -35,5 +35,5 @@ func (h *Handler) ListPeer(c *gin.Context) {
35
35
}
36
36
}
37
37
38
- core .WriteResponse (c , nil , slice )
38
+ core .WriteResponse (c , slice , nil )
39
39
}
You can’t perform that action at this time.
0 commit comments