@@ -105,12 +105,11 @@ func ExampleAddConfigurationSetting() {
105
105
// Create configuration setting
106
106
resp , err := client.AddSetting (
107
107
context.TODO (),
108
- azappconfig.Setting {
109
- Key: to.StringPtr (" key" ),
110
- Label: to.StringPtr (" label" ),
111
- Value: to.StringPtr (" value" )
112
- },
113
- nil )
108
+ " key" ,
109
+ to.Ptr (" value" ),
110
+ &azappconfig.AddSettingOptions {
111
+ Label: to.Ptr (" label" ),
112
+ })
114
113
115
114
if err != nil {
116
115
panic (err)
@@ -143,11 +142,10 @@ func ExampleGetConfigurationSetting() {
143
142
// Get configuration setting
144
143
resp , err := client.GetSetting (
145
144
context.TODO (),
146
- azappconfig.Setting {
147
- Key: to.StringPtr (" key" ),
148
- Label: to.StringPtr (" label" )
149
- },
150
- nil )
145
+ " key"
146
+ &azappconfig.GetSettingOptions {
147
+ Label: to.Ptr (" label" )
148
+ })
151
149
152
150
if err != nil {
153
151
panic (err)
@@ -180,12 +178,11 @@ func ExampleSetConfigurationSetting() {
180
178
// Set configuration setting
181
179
resp , err := client.SetSetting (
182
180
context.TODO (),
183
- azappconfig.Setting {
184
- Key: to.StringPtr (" key" ),
185
- Label: to.StringPtr (" label" ),
186
- Value: to.StringPtr (" new_value" )
187
- },
188
- nil )
181
+ " key" ,
182
+ to.Ptr (" new_value" ),
183
+ &azappconfig.SetSettingOptions {
184
+ Label: to.Ptr (" label" ),
185
+ })
189
186
190
187
if err != nil {
191
188
panic (err)
@@ -218,12 +215,11 @@ func ExampleSetConfigurationSettingReadOnly() {
218
215
// Set configuration setting read only
219
216
resp , err := client.SetReadOnly (
220
217
context.TODO (),
221
- azappconfig.Setting {
222
- Key: to.StringPtr (" key" ),
223
- Label: to.StringPtr (" label" )
224
- },
218
+ " key" ,
225
219
true ,
226
- nil )
220
+ &azappconfig.SetReadOnlyOptions {
221
+ Label: to.Ptr (" label" )
222
+ })
227
223
228
224
if err != nil {
229
225
panic (err)
@@ -237,12 +233,11 @@ func ExampleSetConfigurationSettingReadOnly() {
237
233
// Remove read only status
238
234
resp , err := client.SetReadOnly (
239
235
context.TODO (),
240
- azappconfig.Setting {
241
- Key: to.StringPtr (" key" ),
242
- Label: to.StringPtr (" label" )
243
- },
236
+ " key" ,
244
237
false ,
245
- nil )
238
+ &azappconfig.SetReadOnlyOptions {
239
+ Label: to.Ptr (" label" )
240
+ })
246
241
247
242
if err != nil {
248
243
panic (err)
@@ -273,10 +268,10 @@ func ExampleListRevisions() {
273
268
panic (err)
274
269
}
275
270
276
- revPgr := client.ListRevisions (
271
+ revPgr := client.NewListRevisionsPager (
277
272
azappconfig.SettingSelector {
278
- KeyFilter: to.StringPtr (" *" ),
279
- LabelFilter: to.StringPtr (" *" ),
273
+ KeyFilter: to.Ptr (" *" ),
274
+ LabelFilter: to.Ptr (" *" ),
280
275
Fields: azappconfig.AllSettingFields ()
281
276
},
282
277
nil )
@@ -315,11 +310,10 @@ func ExampleDeleteConfigurationSetting() {
315
310
// Delete configuration setting
316
311
resp , err := client.DeleteSetting (
317
312
context.TODO (),
318
- azappconfig.Setting {
319
- Key: to.StringPtr (" key" ),
320
- Label: to.StringPtr (" label" )
321
- },
322
- nil )
313
+ " key" ,
314
+ &azappconfig.DeleteSettingOptions {
315
+ Label: to.Ptr (" label" )
316
+ })
323
317
324
318
if err != nil {
325
319
panic (err)
0 commit comments