@@ -58,20 +58,20 @@ func runDaemonCommand(cmd *cobra.Command, args []string) {
58
58
type ArduinoCoreServerImpl struct {}
59
59
60
60
func (s * ArduinoCoreServerImpl ) BoardDetails (ctx context.Context , req * rpc.BoardDetailsReq ) (* rpc.BoardDetailsResp , error ) {
61
- return board .BoardDetails (ctx , req )
61
+ return board .Details (ctx , req )
62
62
}
63
63
64
64
func (s * ArduinoCoreServerImpl ) BoardList (ctx context.Context , req * rpc.BoardListReq ) (* rpc.BoardListResp , error ) {
65
- return board .BoardList (ctx , req )
65
+ return board .List (ctx , req )
66
66
}
67
67
68
68
func (s * ArduinoCoreServerImpl ) BoardListAll (ctx context.Context , req * rpc.BoardListAllReq ) (* rpc.BoardListAllResp , error ) {
69
- return board .BoardListAll (ctx , req )
69
+ return board .ListAll (ctx , req )
70
70
}
71
71
72
72
func (s * ArduinoCoreServerImpl ) BoardAttach (req * rpc.BoardAttachReq , stream rpc.ArduinoCore_BoardAttachServer ) error {
73
73
74
- resp , err := board .BoardAttach (stream .Context (), req ,
74
+ resp , err := board .Attach (stream .Context (), req ,
75
75
func (p * rpc.TaskProgress ) { stream .Send (& rpc.BoardAttachResp {TaskProgress : p }) },
76
76
)
77
77
if err != nil {
@@ -207,10 +207,10 @@ func feedStream(streamer func(data []byte)) io.Writer {
207
207
go func () {
208
208
data := make ([]byte , 1024 )
209
209
for {
210
- if n , err := r .Read (data ); err != nil {
211
- return
212
- } else {
210
+ if n , err := r .Read (data ); err == nil {
213
211
streamer (data [:n ])
212
+ } else {
213
+ return
214
214
}
215
215
}
216
216
}()
0 commit comments