File tree Expand file tree Collapse file tree 2 files changed +26
-2
lines changed Expand file tree Collapse file tree 2 files changed +26
-2
lines changed Original file line number Diff line number Diff line change 1
1
//
2
+ // This file is part of arduino-cli.
3
+ //
4
+ // Copyright 2018 ARDUINO SA (http://www.arduino.cc/)
5
+ //
6
+ // This software is released under the GNU General Public License version 3,
7
+ // which covers the main part of arduino-cli.
8
+ // The terms of this license can be found at:
9
+ // https://www.gnu.org/licenses/gpl-3.0.en.html
10
+ //
11
+ // You can be released from the requirements of the above licenses by purchasing
12
+ // a commercial license. Buying such a license is mandatory if you want to modify or
13
+ // otherwise use the software for commercial activities involving the Arduino
14
+ // software without disclosing the source code of your own applications. To purchase
15
+ // a commercial license, send an email to [email protected] .
16
+ //
2
17
3
18
package cli
4
19
Original file line number Diff line number Diff line change @@ -20,7 +20,6 @@ package output
20
20
import (
21
21
"fmt"
22
22
23
- "github.com/arduino/arduino-cli/commands"
24
23
"github.com/arduino/arduino-cli/rpc"
25
24
pb "gopkg.in/cheggaaa/pb.v1"
26
25
)
@@ -51,9 +50,14 @@ func NewDownloadProgressBarCB() func(*rpc.DownloadProgress) {
51
50
}
52
51
}
53
52
53
+ // NewNullDownloadProgressCB returns a progress bar callback that outputs nothing.
54
+ func NewNullDownloadProgressCB () func (* rpc.DownloadProgress ) {
55
+ return func (* rpc.DownloadProgress ) {}
56
+ }
57
+
54
58
// NewTaskProgressCB returns a commands.TaskProgressCB progress listener
55
59
// that outputs to terminal
56
- func NewTaskProgressCB () commands. TaskProgressCB {
60
+ func NewTaskProgressCB () func ( curr * rpc. TaskProgress ) {
57
61
var name string
58
62
return func (curr * rpc.TaskProgress ) {
59
63
// fmt.Printf(">>> %v\n", curr)
@@ -74,3 +78,8 @@ func NewTaskProgressCB() commands.TaskProgressCB {
74
78
}
75
79
}
76
80
}
81
+
82
+ // NewNullTaskProgressCB returns a progress bar callback that outputs nothing.
83
+ func NewNullTaskProgressCB () func (curr * rpc.TaskProgress ) {
84
+ return func (curr * rpc.TaskProgress ) {}
85
+ }
You can’t perform that action at this time.
0 commit comments