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
20b8afa1
Unverified
Commit
20b8afa1
authored
Aug 30, 2019
by
Massimiliano Pippi
Committed by
GitHub
Aug 30, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[skip changelog] sync api query (#383)
parent
549b0fb8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
commands/board/list.go
commands/board/list.go
+5
-0
No files found.
commands/board/list.go
View file @
20b8afa1
...
...
@@ -22,6 +22,7 @@ import (
"fmt"
"io/ioutil"
"net/http"
"sync"
"github.com/arduino/arduino-cli/cli/globals"
"github.com/arduino/arduino-cli/commands"
...
...
@@ -33,6 +34,7 @@ import (
var
(
// ErrNotFound is returned when the API returns 404
ErrNotFound
=
errors
.
New
(
"board not found"
)
m
sync
.
Mutex
)
func
apiByVidPid
(
url
string
)
([]
*
rpc
.
BoardListItem
,
error
)
{
...
...
@@ -78,6 +80,9 @@ func apiByVidPid(url string) ([]*rpc.BoardListItem, error) {
// List FIXMEDOC
func
List
(
instanceID
int32
)
([]
*
rpc
.
DetectedPort
,
error
)
{
m
.
Lock
()
defer
m
.
Unlock
()
pm
:=
commands
.
GetPackageManager
(
instanceID
)
if
pm
==
nil
{
return
nil
,
errors
.
New
(
"invalid instance"
)
...
...
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