mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-10-24 12:32:55 +08:00
upgrade to go1.11
This commit is contained in:
@@ -98,7 +98,7 @@ clean:
|
||||
|
||||
|
||||
fmt:
|
||||
find . -type f -name "*.go" -not -path "./_output/*" \
|
||||
@find . -type f -name "*.go" -not -path "./_output/*" \
|
||||
-not -path "./vendor/*" | xargs gofmt -s -w
|
||||
|
||||
dep:
|
||||
|
||||
@@ -200,8 +200,8 @@ type TaskManager struct {
|
||||
func NewTaskManager(stopCh <-chan struct{}) *TaskManager {
|
||||
return &TaskManager{
|
||||
taskExecutorQueueManager: NewTaskExecutorQueueManager(stopCh),
|
||||
stopCh: stopCh,
|
||||
lock: sync.Mutex{},
|
||||
stopCh: stopCh,
|
||||
lock: sync.Mutex{},
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -234,7 +234,7 @@ func (region *SRegion) DissociateEip(eipId string) error {
|
||||
Primary: &oldIPConf.Properties.Primary,
|
||||
PrivateIPAddress: &oldIPConf.Properties.PrivateIPAddress,
|
||||
PrivateIPAllocationMethod: network.Static,
|
||||
Subnet: &network.Subnet{ID: &oldIPConf.Properties.Subnet.ID},
|
||||
Subnet: &network.Subnet{ID: &oldIPConf.Properties.Subnet.ID},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
@@ -70,7 +70,7 @@ func (self *SRegion) CreateNetworkInterface(nicName string, ipAddr string, subne
|
||||
PrivateIPAddress: &ipAddr,
|
||||
PrivateIPAddressVersion: network.IPv4,
|
||||
PrivateIPAllocationMethod: PrivateIPAllocationMethod,
|
||||
Subnet: &network.Subnet{ID: &subnetId},
|
||||
Subnet: &network.Subnet{ID: &subnetId},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
@@ -318,7 +318,7 @@ func convertSecurityGroupRule(rule secrules.SecurityRule) *network.SecurityRule
|
||||
name = strings.Replace(name, "-", "_", -1)
|
||||
name = fmt.Sprintf("%s_%d", name, rule.Priority)
|
||||
destRule := network.SecurityRule{
|
||||
Name: &name,
|
||||
Name: &name,
|
||||
SecurityRulePropertiesFormat: &network.SecurityRulePropertiesFormat{},
|
||||
}
|
||||
protocol := network.SecurityRuleProtocolAsterisk
|
||||
|
||||
@@ -129,7 +129,7 @@ func (manager *SParameterManager) ValidateCreateData(ctx context.Context, userCr
|
||||
return data, nil
|
||||
}
|
||||
|
||||
func (manager *SParameterManager) GetOwnerId(userCred mcclient.TokenCredential) string {
|
||||
func (manager *SParameterManager) GetOwnerId(userCred mcclient.IIdentityProvider) string {
|
||||
return userCred.GetUserId()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user