@@ -57,17 +57,6 @@ type PackageManager struct {
57
57
PackagesDir * paths.Path
58
58
DownloadDir * paths.Path
59
59
TempDir * paths.Path
60
-
61
- // TODO: This might be a list in the future, but would it be of any help?
62
- eventHandler EventHandler
63
- }
64
-
65
- // EventHandler defines the events that are generated by the PackageManager
66
- // Subscribing to such events allows, for instance, to print out logs of what is happening
67
- // (say you use them for a CLI...)
68
- type EventHandler interface {
69
- // FIXME: This is temporary, for prototyping (an handler should not return an handler; besides, this leakes
70
- // the usage of releases...)
71
60
}
72
61
73
62
// NewPackageManager returns a new instance of the PackageManager
@@ -219,21 +208,6 @@ func (pm *PackageManager) ResolveFQBN(fqbn *cores.FQBN) (
219
208
return targetPackage , platformRelease , board , buildProperties , buildPlatformRelease , nil
220
209
}
221
210
222
- // FIXME add an handler to be invoked on each verbose operation, in order to let commands display results through the formatter
223
- // as for the progress bars during download
224
- func (pm * PackageManager ) RegisterEventHandler (eventHandler EventHandler ) {
225
- if pm .eventHandler != nil {
226
- panic ("Don't try to register another event handler to the PackageManager yet!" )
227
- }
228
-
229
- pm .eventHandler = eventHandler
230
- }
231
-
232
- // GetEventHandlers returns a slice of the registered EventHandlers
233
- func (pm * PackageManager ) GetEventHandlers () []* EventHandler {
234
- return append ([]* EventHandler {}, & pm .eventHandler )
235
- }
236
-
237
211
// LoadPackageIndex loads a package index by looking up the local cached file from the specified URL
238
212
func (pm * PackageManager ) LoadPackageIndex (URL * url.URL ) error {
239
213
indexPath := pm .IndexDir .Join (path .Base (URL .Path ))
0 commit comments