Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
arduino-cli
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Operations
Operations
Metrics
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
xpstem
arduino-cli
Commits
cd95478c
Commit
cd95478c
authored
Aug 29, 2018
by
Mattia Bertorello
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed comments and rename type1 to libType
parent
2e5768cf
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
9 deletions
+9
-9
builder_client_helpers/examples.go
builder_client_helpers/examples.go
+5
-5
builder_client_helpers/libraries.go
builder_client_helpers/libraries.go
+3
-3
commands/commands_test.go
commands/commands_test.go
+1
-1
No files found.
builder_client_helpers/examples.go
View file @
cd95478c
...
...
@@ -30,8 +30,8 @@ func ListExamplesPath() string {
}
// ListExamples provides a list of all the builtin examples
func
(
c
*
Client
)
ListExamples
(
ctx
context
.
Context
,
path
string
,
maintainer
*
string
,
type1
*
string
)
(
*
http
.
Response
,
error
)
{
req
,
err
:=
c
.
NewListExamplesRequest
(
ctx
,
path
,
maintainer
,
type1
)
func
(
c
*
Client
)
ListExamples
(
ctx
context
.
Context
,
path
string
,
maintainer
*
string
,
libType
*
string
)
(
*
http
.
Response
,
error
)
{
req
,
err
:=
c
.
NewListExamplesRequest
(
ctx
,
path
,
maintainer
,
libType
)
if
err
!=
nil
{
return
nil
,
err
}
...
...
@@ -39,7 +39,7 @@ func (c *Client) ListExamples(ctx context.Context, path string, maintainer *stri
}
// NewListExamplesRequest create the request corresponding to the list action endpoint of the examples resource.
func
(
c
*
Client
)
NewListExamplesRequest
(
ctx
context
.
Context
,
path
string
,
maintainer
*
string
,
type1
*
string
)
(
*
http
.
Request
,
error
)
{
func
(
c
*
Client
)
NewListExamplesRequest
(
ctx
context
.
Context
,
path
string
,
maintainer
*
string
,
libType
*
string
)
(
*
http
.
Request
,
error
)
{
scheme
:=
c
.
Scheme
if
scheme
==
""
{
scheme
=
"http"
...
...
@@ -49,8 +49,8 @@ func (c *Client) NewListExamplesRequest(ctx context.Context, path string, mainta
if
maintainer
!=
nil
{
values
.
Set
(
"maintainer"
,
*
maintainer
)
}
if
type1
!=
nil
{
values
.
Set
(
"type"
,
*
type1
)
if
libType
!=
nil
{
values
.
Set
(
"type"
,
*
libType
)
}
u
.
RawQuery
=
values
.
Encode
()
req
,
err
:=
http
.
NewRequest
(
"GET"
,
u
.
String
(),
nil
)
...
...
builder_client_helpers/libraries.go
View file @
cd95478c
...
...
@@ -43,7 +43,7 @@ func (c *Client) ListLibraries(
}
// NewListLibrariesRequest create the request corresponding to the list action endpoint of the libraries resource.
func
(
c
*
Client
)
NewListLibrariesRequest
(
ctx
context
.
Context
,
path
string
,
maintainer
*
string
,
type1
*
string
,
withoutType
*
string
)
(
*
http
.
Request
,
error
)
{
func
(
c
*
Client
)
NewListLibrariesRequest
(
ctx
context
.
Context
,
path
string
,
maintainer
*
string
,
libType
*
string
,
withoutType
*
string
)
(
*
http
.
Request
,
error
)
{
scheme
:=
c
.
Scheme
if
scheme
==
""
{
scheme
=
"http"
...
...
@@ -53,8 +53,8 @@ func (c *Client) NewListLibrariesRequest(ctx context.Context, path string, maint
if
maintainer
!=
nil
{
values
.
Set
(
"maintainer"
,
*
maintainer
)
}
if
type1
!=
nil
{
values
.
Set
(
"type"
,
*
type1
)
if
libType
!=
nil
{
values
.
Set
(
"type"
,
*
libType
)
}
if
withoutType
!=
nil
{
values
.
Set
(
"without_type"
,
*
withoutType
)
...
...
commands/commands_test.go
View file @
cd95478c
...
...
@@ -35,7 +35,7 @@ import (
// Redirecting stdOut so we can analyze output line by
// line and check with what we want.
var
stdOut
=
os
.
Stdout
// *os.File
var
stdOut
=
os
.
Stdout
type
stdOutRedirect
struct
{
tempFile
*
os
.
File
...
...
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