@@ -14,38 +14,38 @@ import (
14
14
15
15
var tr = i18n .Tr
16
16
17
- // CoreInstance is an instance of the Arduino Core Services. The user can
17
+ // coreInstance is an instance of the Arduino Core Services. The user can
18
18
// instantiate as many as needed by providing a different configuration
19
19
// for each one.
20
- type CoreInstance struct {
20
+ type coreInstance struct {
21
21
pm * packagemanager.PackageManager
22
22
lm * librariesmanager.LibrariesManager
23
23
}
24
24
25
25
// coreInstancesContainer has methods to add an remove instances atomically.
26
26
type coreInstancesContainer struct {
27
- instances map [int32 ]* CoreInstance
27
+ instances map [int32 ]* coreInstance
28
28
instancesCount int32
29
29
instancesMux sync.Mutex
30
30
}
31
31
32
32
// instances contains all the running Arduino Core Services instances
33
33
var instances = & coreInstancesContainer {
34
- instances : map [int32 ]* CoreInstance {},
34
+ instances : map [int32 ]* coreInstance {},
35
35
instancesCount : 1 ,
36
36
}
37
37
38
38
// GetInstance returns a CoreInstance for the given ID, or nil if ID
39
39
// doesn't exist
40
- func (c * coreInstancesContainer ) GetInstance (id int32 ) * CoreInstance {
40
+ func (c * coreInstancesContainer ) GetInstance (id int32 ) * coreInstance {
41
41
c .instancesMux .Lock ()
42
42
defer c .instancesMux .Unlock ()
43
43
return c .instances [id ]
44
44
}
45
45
46
46
// AddAndAssignID saves the CoreInstance and assigns a unique ID to
47
47
// retrieve it later
48
- func (c * coreInstancesContainer ) AddAndAssignID (i * CoreInstance ) int32 {
48
+ func (c * coreInstancesContainer ) AddAndAssignID (i * coreInstance ) int32 {
49
49
c .instancesMux .Lock ()
50
50
defer c .instancesMux .Unlock ()
51
51
id := c .instancesCount
@@ -110,7 +110,7 @@ func SetLibraryManager(inst *rpc.Instance, lm *librariesmanager.LibrariesManager
110
110
111
111
// Create a new *rpc.Instance ready to be initialized, supporting directories are also created.
112
112
func Create (extraUserAgent ... string ) (* rpc.Instance , error ) {
113
- instance := & CoreInstance {}
113
+ instance := & coreInstance {}
114
114
115
115
// Setup downloads directory
116
116
downloadsDir := configuration .DownloadsDir (configuration .Settings )
0 commit comments