Skip to content

Commit

Permalink
apply suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
umbynos committed Aug 3, 2021
1 parent 575efa1 commit 2d78733
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 17 deletions.
33 changes: 18 additions & 15 deletions hub.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,21 +38,24 @@ var h = hub{
connections: make(map[*connection]bool),
}

const commands = "{\"Commands\": [" +
"\"list\", " +
"\"open < portName > < baud > [bufferAlgorithm: ({default}, timed, timedraw, timedbinary)]\", " +
"\"send < portName > < cmd >\", " +
"\"sendnobuf < portName > < cmd >\", " +
"\"close < portName >\", " +
"\"restart\", " +
"\"exit\", " +
"\"killupload\", " +
"\"downloadtool < tool > < toolVersion: {latest} > < pack: {arduino} > < behaviour: {keep} >\", " +
"\"log\", " +
"\"memorystats\", " +
"\"gc\", " +
"\"hostname\", " +
"\"version\"]} "
const commands = `{
"Commands": [
"list",
"open < portName > < baud > [bufferAlgorithm: ({default}, timed, timedraw, timedbinary)]",
"send < portName > < cmd >",
"sendnobuf < portName > < cmd >",
"close < portName >",
"restart",
"exit",
"killupload",
"downloadtool < tool > < toolVersion: {latest} > < pack: {arduino} > < behaviour: {keep} >",
"log",
"memorystats",
"gc",
"hostname",
"version"
]
}`

func (h *hub) unregisterConnection(c *connection) {
if _, contains := h.connections[c]; !contains {
Expand Down
3 changes: 1 addition & 2 deletions test/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@ def running_on_ci():
"""
Returns whether the program is running on a CI environment
"""
val = os.getenv("GITHUB_WORKFLOW")
return val is not None
return 'GITHUB_WORKFLOW' in os.environ
File renamed without changes.

0 comments on commit 2d78733

Please sign in to comment.