@@ -43,7 +43,7 @@ func (e *InvalidInstanceError) Error() string {
43
43
return tr ("Invalid instance" )
44
44
}
45
45
46
- // ToRPCStatus convertes the error into a *status.Status
46
+ // ToRPCStatus converts the error into a *status.Status
47
47
func (e * InvalidInstanceError ) ToRPCStatus () * status.Status {
48
48
return status .New (codes .InvalidArgument , e .Error ())
49
49
}
@@ -57,7 +57,7 @@ func (e *InvalidFQBNError) Error() string {
57
57
return composeErrorMsg (tr ("Invalid FQBN" ), e .Cause )
58
58
}
59
59
60
- // ToRPCStatus convertes the error into a *status.Status
60
+ // ToRPCStatus converts the error into a *status.Status
61
61
func (e * InvalidFQBNError ) ToRPCStatus () * status.Status {
62
62
return status .New (codes .InvalidArgument , e .Error ())
63
63
}
@@ -75,7 +75,7 @@ func (e *InvalidURLError) Error() string {
75
75
return composeErrorMsg (tr ("Invalid URL" ), e .Cause )
76
76
}
77
77
78
- // ToRPCStatus convertes the error into a *status.Status
78
+ // ToRPCStatus converts the error into a *status.Status
79
79
func (e * InvalidURLError ) ToRPCStatus () * status.Status {
80
80
return status .New (codes .InvalidArgument , e .Error ())
81
81
}
@@ -93,7 +93,7 @@ func (e *InvalidLibraryError) Error() string {
93
93
return composeErrorMsg (tr ("Invalid library" ), e .Cause )
94
94
}
95
95
96
- // ToRPCStatus convertes the error into a *status.Status
96
+ // ToRPCStatus converts the error into a *status.Status
97
97
func (e * InvalidLibraryError ) ToRPCStatus () * status.Status {
98
98
return status .New (codes .InvalidArgument , e .Error ())
99
99
}
@@ -111,7 +111,7 @@ func (e *InvalidVersionError) Error() string {
111
111
return composeErrorMsg (tr ("Invalid version" ), e .Cause )
112
112
}
113
113
114
- // ToRPCStatus convertes the error into a *status.Status
114
+ // ToRPCStatus converts the error into a *status.Status
115
115
func (e * InvalidVersionError ) ToRPCStatus () * status.Status {
116
116
return status .New (codes .InvalidArgument , e .Error ())
117
117
}
@@ -127,7 +127,7 @@ func (e *MissingFQBNError) Error() string {
127
127
return tr ("Missing FQBN (Fully Qualified Board Name)" )
128
128
}
129
129
130
- // ToRPCStatus convertes the error into a *status.Status
130
+ // ToRPCStatus converts the error into a *status.Status
131
131
func (e * MissingFQBNError ) ToRPCStatus () * status.Status {
132
132
return status .New (codes .InvalidArgument , e .Error ())
133
133
}
@@ -145,7 +145,7 @@ func (e *UnknownFQBNError) Unwrap() error {
145
145
return e .Cause
146
146
}
147
147
148
- // ToRPCStatus convertes the error into a *status.Status
148
+ // ToRPCStatus converts the error into a *status.Status
149
149
func (e * UnknownFQBNError ) ToRPCStatus () * status.Status {
150
150
return status .New (codes .NotFound , e .Error ())
151
151
}
@@ -157,7 +157,7 @@ func (e *MissingPortProtocolError) Error() string {
157
157
return tr ("Missing port protocol" )
158
158
}
159
159
160
- // ToRPCStatus convertes the error into a *status.Status
160
+ // ToRPCStatus converts the error into a *status.Status
161
161
func (e * MissingPortProtocolError ) ToRPCStatus () * status.Status {
162
162
return status .New (codes .InvalidArgument , e .Error ())
163
163
}
@@ -169,20 +169,20 @@ func (e *MissingProgrammerError) Error() string {
169
169
return tr ("Missing programmer" )
170
170
}
171
171
172
- // ToRPCStatus convertes the error into a *status.Status
172
+ // ToRPCStatus converts the error into a *status.Status
173
173
func (e * MissingProgrammerError ) ToRPCStatus () * status.Status {
174
174
return status .New (codes .InvalidArgument , e .Error ())
175
175
}
176
176
177
- // ProgreammerRequiredForUploadError is returned then the upload can be done only using a programmer
178
- type ProgreammerRequiredForUploadError struct {}
177
+ // ProgrammerRequiredForUploadError is returned then the upload can be done only using a programmer
178
+ type ProgrammerRequiredForUploadError struct {}
179
179
180
- func (e * ProgreammerRequiredForUploadError ) Error () string {
180
+ func (e * ProgrammerRequiredForUploadError ) Error () string {
181
181
return tr ("A programmer is required to upload" )
182
182
}
183
183
184
- // ToRPCStatus convertes the error into a *status.Status
185
- func (e * ProgreammerRequiredForUploadError ) ToRPCStatus () * status.Status {
184
+ // ToRPCStatus converts the error into a *status.Status
185
+ func (e * ProgrammerRequiredForUploadError ) ToRPCStatus () * status.Status {
186
186
st , _ := status .
187
187
New (codes .InvalidArgument , e .Error ()).
188
188
WithDetails (& rpc.ProgrammerIsRequiredForUploadError {})
@@ -203,7 +203,7 @@ func (e *ProgrammerNotFoundError) Unwrap() error {
203
203
return e .Cause
204
204
}
205
205
206
- // ToRPCStatus convertes the error into a *status.Status
206
+ // ToRPCStatus converts the error into a *status.Status
207
207
func (e * ProgrammerNotFoundError ) ToRPCStatus () * status.Status {
208
208
return status .New (codes .NotFound , e .Error ())
209
209
}
@@ -218,7 +218,7 @@ func (e *InvalidPlatformPropertyError) Error() string {
218
218
return tr ("Invalid '%[1]s' property: %[2]s" , e .Property , e .Value )
219
219
}
220
220
221
- // ToRPCStatus convertes the error into a *status.Status
221
+ // ToRPCStatus converts the error into a *status.Status
222
222
func (e * InvalidPlatformPropertyError ) ToRPCStatus () * status.Status {
223
223
return status .New (codes .FailedPrecondition , e .Error ())
224
224
}
@@ -232,7 +232,7 @@ func (e *MissingPlatformPropertyError) Error() string {
232
232
return tr ("Property '%s' is undefined" , e .Property )
233
233
}
234
234
235
- // ToRPCStatus convertes the error into a *status.Status
235
+ // ToRPCStatus converts the error into a *status.Status
236
236
func (e * MissingPlatformPropertyError ) ToRPCStatus () * status.Status {
237
237
return status .New (codes .FailedPrecondition , e .Error ())
238
238
}
@@ -247,7 +247,7 @@ func (e *PlatformNotFound) Error() string {
247
247
return composeErrorMsg (tr ("Platform '%s' not found" , e .Platform ), e .Cause )
248
248
}
249
249
250
- // ToRPCStatus convertes the error into a *status.Status
250
+ // ToRPCStatus converts the error into a *status.Status
251
251
func (e * PlatformNotFound ) ToRPCStatus () * status.Status {
252
252
return status .New (codes .FailedPrecondition , e .Error ())
253
253
}
@@ -266,7 +266,7 @@ func (e *LibraryNotFound) Error() string {
266
266
return composeErrorMsg (tr ("Library '%s' not found" , e .Library ), e .Cause )
267
267
}
268
268
269
- // ToRPCStatus convertes the error into a *status.Status
269
+ // ToRPCStatus converts the error into a *status.Status
270
270
func (e * LibraryNotFound ) ToRPCStatus () * status.Status {
271
271
return status .New (codes .FailedPrecondition , e .Error ())
272
272
}
@@ -285,7 +285,7 @@ func (e *LibraryDependenciesResolutionFailedError) Error() string {
285
285
return composeErrorMsg (tr ("No valid dependencies solution found" ), e .Cause )
286
286
}
287
287
288
- // ToRPCStatus convertes the error into a *status.Status
288
+ // ToRPCStatus converts the error into a *status.Status
289
289
func (e * LibraryDependenciesResolutionFailedError ) ToRPCStatus () * status.Status {
290
290
return status .New (codes .FailedPrecondition , e .Error ())
291
291
}
@@ -303,7 +303,7 @@ func (e *PlatformAlreadyAtTheLatestVersionError) Error() string {
303
303
return tr ("Platform '%s' is already at the latest version" , e .Platform )
304
304
}
305
305
306
- // ToRPCStatus convertes the error into a *status.Status
306
+ // ToRPCStatus converts the error into a *status.Status
307
307
func (e * PlatformAlreadyAtTheLatestVersionError ) ToRPCStatus () * status.Status {
308
308
st , _ := status .
309
309
New (codes .AlreadyExists , e .Error ()).
@@ -318,7 +318,7 @@ func (e *MissingSketchPathError) Error() string {
318
318
return tr ("Missing sketch path" )
319
319
}
320
320
321
- // ToRPCStatus convertes the error into a *status.Status
321
+ // ToRPCStatus converts the error into a *status.Status
322
322
func (e * MissingSketchPathError ) ToRPCStatus () * status.Status {
323
323
return status .New (codes .InvalidArgument , e .Error ())
324
324
}
@@ -336,7 +336,7 @@ func (e *CantOpenSketchError) Unwrap() error {
336
336
return e .Cause
337
337
}
338
338
339
- // ToRPCStatus convertes the error into a *status.Status
339
+ // ToRPCStatus converts the error into a *status.Status
340
340
func (e * CantOpenSketchError ) ToRPCStatus () * status.Status {
341
341
return status .New (codes .NotFound , e .Error ())
342
342
}
@@ -355,7 +355,7 @@ func (e *FailedInstallError) Unwrap() error {
355
355
return e .Cause
356
356
}
357
357
358
- // ToRPCStatus convertes the error into a *status.Status
358
+ // ToRPCStatus converts the error into a *status.Status
359
359
func (e * FailedInstallError ) ToRPCStatus () * status.Status {
360
360
return status .New (codes .Internal , e .Error ())
361
361
}
@@ -373,7 +373,7 @@ func (e *FailedLibraryInstallError) Unwrap() error {
373
373
return e .Cause
374
374
}
375
375
376
- // ToRPCStatus convertes the error into a *status.Status
376
+ // ToRPCStatus converts the error into a *status.Status
377
377
func (e * FailedLibraryInstallError ) ToRPCStatus () * status.Status {
378
378
return status .New (codes .Internal , e .Error ())
379
379
}
@@ -392,7 +392,7 @@ func (e *FailedUninstallError) Unwrap() error {
392
392
return e .Cause
393
393
}
394
394
395
- // ToRPCStatus convertes the error into a *status.Status
395
+ // ToRPCStatus converts the error into a *status.Status
396
396
func (e * FailedUninstallError ) ToRPCStatus () * status.Status {
397
397
return status .New (codes .Internal , e .Error ())
398
398
}
@@ -411,7 +411,7 @@ func (e *FailedDownloadError) Unwrap() error {
411
411
return e .Cause
412
412
}
413
413
414
- // ToRPCStatus convertes the error into a *status.Status
414
+ // ToRPCStatus converts the error into a *status.Status
415
415
func (e * FailedDownloadError ) ToRPCStatus () * status.Status {
416
416
return status .New (codes .Internal , e .Error ())
417
417
}
@@ -430,7 +430,7 @@ func (e *FailedUploadError) Unwrap() error {
430
430
return e .Cause
431
431
}
432
432
433
- // ToRPCStatus convertes the error into a *status.Status
433
+ // ToRPCStatus converts the error into a *status.Status
434
434
func (e * FailedUploadError ) ToRPCStatus () * status.Status {
435
435
return status .New (codes .Internal , e .Error ())
436
436
}
@@ -449,7 +449,7 @@ func (e *FailedDebugError) Unwrap() error {
449
449
return e .Cause
450
450
}
451
451
452
- // ToRPCStatus convertes the error into a *status.Status
452
+ // ToRPCStatus converts the error into a *status.Status
453
453
func (e * FailedDebugError ) ToRPCStatus () * status.Status {
454
454
return status .New (codes .Internal , e .Error ())
455
455
}
@@ -468,7 +468,7 @@ func (e *CompileFailedError) Unwrap() error {
468
468
return e .Cause
469
469
}
470
470
471
- // ToRPCStatus convertes the error into a *status.Status
471
+ // ToRPCStatus converts the error into a *status.Status
472
472
func (e * CompileFailedError ) ToRPCStatus () * status.Status {
473
473
return status .New (codes .Internal , e .Error ())
474
474
}
@@ -487,7 +487,7 @@ func (e *InvalidArgumentError) Unwrap() error {
487
487
return e .Cause
488
488
}
489
489
490
- // ToRPCStatus convertes the error into a *status.Status
490
+ // ToRPCStatus converts the error into a *status.Status
491
491
func (e * InvalidArgumentError ) ToRPCStatus () * status.Status {
492
492
return status .New (codes .InvalidArgument , e .Error ())
493
493
}
@@ -506,7 +506,7 @@ func (e *NotFoundError) Unwrap() error {
506
506
return e .Cause
507
507
}
508
508
509
- // ToRPCStatus convertes the error into a *status.Status
509
+ // ToRPCStatus converts the error into a *status.Status
510
510
func (e * NotFoundError ) ToRPCStatus () * status.Status {
511
511
return status .New (codes .NotFound , e .Error ())
512
512
}
@@ -525,7 +525,7 @@ func (e *PermissionDeniedError) Unwrap() error {
525
525
return e .Cause
526
526
}
527
527
528
- // ToRPCStatus convertes the error into a *status.Status
528
+ // ToRPCStatus converts the error into a *status.Status
529
529
func (e * PermissionDeniedError ) ToRPCStatus () * status.Status {
530
530
return status .New (codes .PermissionDenied , e .Error ())
531
531
}
@@ -544,7 +544,7 @@ func (e *UnavailableError) Unwrap() error {
544
544
return e .Cause
545
545
}
546
546
547
- // ToRPCStatus convertes the error into a *status.Status
547
+ // ToRPCStatus converts the error into a *status.Status
548
548
func (e * UnavailableError ) ToRPCStatus () * status.Status {
549
549
return status .New (codes .Unavailable , e .Error ())
550
550
}
@@ -562,7 +562,7 @@ func (e *TempDirCreationFailedError) Unwrap() error {
562
562
return e .Cause
563
563
}
564
564
565
- // ToRPCStatus convertes the error into a *status.Status
565
+ // ToRPCStatus converts the error into a *status.Status
566
566
func (e * TempDirCreationFailedError ) ToRPCStatus () * status.Status {
567
567
return status .New (codes .Unavailable , e .Error ())
568
568
}
@@ -580,7 +580,7 @@ func (e *TempFileCreationFailedError) Unwrap() error {
580
580
return e .Cause
581
581
}
582
582
583
- // ToRPCStatus convertes the error into a *status.Status
583
+ // ToRPCStatus converts the error into a *status.Status
584
584
func (e * TempFileCreationFailedError ) ToRPCStatus () * status.Status {
585
585
return status .New (codes .Unavailable , e .Error ())
586
586
}
@@ -599,7 +599,7 @@ func (e *SignatureVerificationFailedError) Unwrap() error {
599
599
return e .Cause
600
600
}
601
601
602
- // ToRPCStatus convertes the error into a *status.Status
602
+ // ToRPCStatus converts the error into a *status.Status
603
603
func (e * SignatureVerificationFailedError ) ToRPCStatus () * status.Status {
604
604
return status .New (codes .Unavailable , e .Error ())
605
605
}
0 commit comments