Skip to content

Commit b432553

Browse files
committed
Fixes #183. Refactored the method signature as commented on the PR
2 parents ee80c8e + 9084337 commit b432553

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

request.go

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,17 @@ type Request struct {
2424

2525
// NewRequest returns a request initialized with given arguments
2626
// An non-nil error will be returned if the provided option values are invalid
27+
<<<<<<< HEAD
2728
func NewRequest(ctx context.Context,
2829
path []string, opts OptMap,
2930
args []string,
3031
file files.Directory,
3132
root *Command,
3233
) (*Request, error) {
34+
=======
35+
func NewRequest(ctx context.Context, path []string, opts OptMap, args []string,
36+
file files.Directory, root *Command) (*Request, error) {
37+
>>>>>>> 90843374f694708a997c8e6e4d15142610c50cbf
3338
if opts == nil {
3439
opts = make(OptMap)
3540
}
@@ -39,7 +44,11 @@ func NewRequest(ctx context.Context,
3944
return nil, err
4045
}
4146

47+
<<<<<<< HEAD
4248
err = checkAndConvertOptions(root, opts, path)
49+
=======
50+
err = convertOptions(root, opts, path)
51+
>>>>>>> 90843374f694708a997c8e6e4d15142610c50cbf
4352
req := &Request{
4453
Path: path,
4554
Options: opts,
@@ -100,7 +109,11 @@ func (req *Request) SetOption(name string, value interface{}) {
100109
return
101110
}
102111

112+
<<<<<<< HEAD
103113
func checkAndConvertOptions(root *Command, opts OptMap, path []string) error {
114+
=======
115+
func convertOptions(root *Command, opts OptMap, path []string) error {
116+
>>>>>>> 90843374f694708a997c8e6e4d15142610c50cbf
104117
optDefs, err := root.GetOptions(path)
105118
if err != nil {
106119
return err

0 commit comments

Comments
 (0)