4
vm "github.com/Azure/azure-sdk-for-go/management/virtualmachine"
7
func updateOrAddConfig(configs []vm.ConfigurationSet, configType vm.ConfigurationSetType, update func(*vm.ConfigurationSet)) []vm.ConfigurationSet {
8
config := findConfig(configs, configType)
10
configs = append(configs, vm.ConfigurationSet{ConfigurationSetType: configType})
11
config = findConfig(configs, configType)
18
func findConfig(configs []vm.ConfigurationSet, configType vm.ConfigurationSetType) *vm.ConfigurationSet {
19
for i, config := range configs {
20
if config.ConfigurationSetType == configType {
21
// need to return a pointer to the original set in configs,
22
// not the copy made by the range iterator