@@ -28,7 +28,7 @@ import (
28
28
29
29
// SettingsGetAll returns a message with a string field containing all the settings
30
30
// currently in use, marshalled in JSON format.
31
- func (s * ArduinoCoreServerImpl ) SettingsGetAll (ctx context.Context , req * rpc.SettingsGetAllRequest ) (* rpc.SettingsGetAllResponse , error ) {
31
+ func (s * arduinoCoreServerImpl ) SettingsGetAll (ctx context.Context , req * rpc.SettingsGetAllRequest ) (* rpc.SettingsGetAllResponse , error ) {
32
32
b , err := json .Marshal (configuration .Settings .AllSettings ())
33
33
if err == nil {
34
34
return & rpc.SettingsGetAllResponse {
@@ -68,7 +68,7 @@ func mapper(toMap map[string]interface{}) map[string]interface{} {
68
68
}
69
69
70
70
// SettingsMerge applies multiple settings values at once.
71
- func (s * ArduinoCoreServerImpl ) SettingsMerge (ctx context.Context , req * rpc.SettingsMergeRequest ) (* rpc.SettingsMergeResponse , error ) {
71
+ func (s * arduinoCoreServerImpl ) SettingsMerge (ctx context.Context , req * rpc.SettingsMergeRequest ) (* rpc.SettingsMergeResponse , error ) {
72
72
var toMerge map [string ]interface {}
73
73
if err := json .Unmarshal ([]byte (req .GetJsonData ()), & toMerge ); err != nil {
74
74
return nil , err
@@ -93,7 +93,7 @@ func (s *ArduinoCoreServerImpl) SettingsMerge(ctx context.Context, req *rpc.Sett
93
93
// SettingsGetValue returns a settings value given its key. If the key is not present
94
94
// an error will be returned, so that we distinguish empty settings from missing
95
95
// ones.
96
- func (s * ArduinoCoreServerImpl ) SettingsGetValue (ctx context.Context , req * rpc.SettingsGetValueRequest ) (* rpc.SettingsGetValueResponse , error ) {
96
+ func (s * arduinoCoreServerImpl ) SettingsGetValue (ctx context.Context , req * rpc.SettingsGetValueRequest ) (* rpc.SettingsGetValueResponse , error ) {
97
97
key := req .GetKey ()
98
98
99
99
// Check if settings key actually existing, we don't use Viper.InConfig()
@@ -121,7 +121,7 @@ func (s *ArduinoCoreServerImpl) SettingsGetValue(ctx context.Context, req *rpc.S
121
121
}
122
122
123
123
// SettingsSetValue updates or set a value for a certain key.
124
- func (s * ArduinoCoreServerImpl ) SettingsSetValue (ctx context.Context , val * rpc.SettingsSetValueRequest ) (* rpc.SettingsSetValueResponse , error ) {
124
+ func (s * arduinoCoreServerImpl ) SettingsSetValue (ctx context.Context , val * rpc.SettingsSetValueRequest ) (* rpc.SettingsSetValueResponse , error ) {
125
125
key := val .GetKey ()
126
126
var value interface {}
127
127
@@ -137,15 +137,15 @@ func (s *ArduinoCoreServerImpl) SettingsSetValue(ctx context.Context, val *rpc.S
137
137
// We don't have a Read() function, that's not necessary since we only want one config file to be used
138
138
// and that's picked up when the CLI is run as daemon, either using the default path or a custom one
139
139
// set with the --config-file flag.
140
- func (s * ArduinoCoreServerImpl ) SettingsWrite (ctx context.Context , req * rpc.SettingsWriteRequest ) (* rpc.SettingsWriteResponse , error ) {
140
+ func (s * arduinoCoreServerImpl ) SettingsWrite (ctx context.Context , req * rpc.SettingsWriteRequest ) (* rpc.SettingsWriteResponse , error ) {
141
141
if err := configuration .Settings .WriteConfigAs (req .GetFilePath ()); err != nil {
142
142
return nil , err
143
143
}
144
144
return & rpc.SettingsWriteResponse {}, nil
145
145
}
146
146
147
147
// SettingsDelete removes a key from the config file
148
- func (s * ArduinoCoreServerImpl ) SettingsDelete (ctx context.Context , req * rpc.SettingsDeleteRequest ) (* rpc.SettingsDeleteResponse , error ) {
148
+ func (s * arduinoCoreServerImpl ) SettingsDelete (ctx context.Context , req * rpc.SettingsDeleteRequest ) (* rpc.SettingsDeleteResponse , error ) {
149
149
toDelete := req .GetKey ()
150
150
151
151
// Check if settings key actually existing, we don't use Viper.InConfig()
0 commit comments