Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
dms3
go-dms3
Commits
c19bdf18
Commit
c19bdf18
authored
10 years ago
by
Matt Bell
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
commands: Added Request#SetOptions
parent
57c48adf
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
+7
-0
commands/request.go
commands/request.go
+7
-0
No files found.
commands/request.go
View file @
c19bdf18
...
@@ -61,6 +61,7 @@ type Request interface {
...
@@ -61,6 +61,7 @@ type Request interface {
Option
(
name
string
)
*
OptionValue
Option
(
name
string
)
*
OptionValue
Options
()
optMap
Options
()
optMap
SetOption
(
name
string
,
val
interface
{})
SetOption
(
name
string
,
val
interface
{})
SetOptions
(
opts
map
[
string
]
interface
{})
error
Arguments
()
[]
string
Arguments
()
[]
string
SetArguments
([]
string
)
SetArguments
([]
string
)
Files
()
File
Files
()
File
...
@@ -144,6 +145,12 @@ func (r *request) SetOption(name string, val interface{}) {
...
@@ -144,6 +145,12 @@ func (r *request) SetOption(name string, val interface{}) {
r
.
options
[
name
]
=
val
r
.
options
[
name
]
=
val
}
}
// SetOptions sets the option values, unsetting any values that were previously set
func
(
r
*
request
)
SetOptions
(
opts
map
[
string
]
interface
{})
error
{
r
.
options
=
opts
return
r
.
ConvertOptions
()
}
// Arguments returns the arguments slice
// Arguments returns the arguments slice
func
(
r
*
request
)
Arguments
()
[]
string
{
func
(
r
*
request
)
Arguments
()
[]
string
{
return
r
.
arguments
return
r
.
arguments
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment