зеркало из https://github.com/Azure/aks-engine.git
ref(*): remove dead code
This commit is contained in:
Родитель
95d6609496
Коммит
693ce0bfde
|
@ -17,17 +17,3 @@ func ConvertVLabsUpgradeContainerService(vlabs *vlabs.UpgradeContainerService) *
|
|||
convertVLabsOrchestratorProfile(vlabs.OrchestratorProfile, ucs.OrchestratorProfile)
|
||||
return ucs
|
||||
}
|
||||
|
||||
func convertVLabsUpgradeOrchestratorProfile(vlabscs *vlabs.OrchestratorProfile, api *OrchestratorProfile) {
|
||||
api.OrchestratorType = OrchestratorType(vlabscs.OrchestratorType)
|
||||
if api.OrchestratorType == Kubernetes {
|
||||
switch vlabscs.OrchestratorVersion {
|
||||
case vlabs.Kubernetes162:
|
||||
api.OrchestratorVersion = Kubernetes162
|
||||
case vlabs.Kubernetes160:
|
||||
api.OrchestratorVersion = Kubernetes160
|
||||
default:
|
||||
api.OrchestratorVersion = KubernetesLatest
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -148,14 +148,3 @@ func validateUniqueProfileNames(profiles []*AgentPoolProfile) error {
|
|||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func validateUniquePorts(ports []int, name string) error {
|
||||
portMap := make(map[int]bool)
|
||||
for _, port := range ports {
|
||||
if _, ok := portMap[port]; ok {
|
||||
return fmt.Errorf("agent profile '%s' has duplicate port '%d', ports must be unique", name, port)
|
||||
}
|
||||
portMap[port] = true
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
|
|
@ -164,14 +164,3 @@ func validateUniqueProfileNames(profiles []*AgentPoolProfile) error {
|
|||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func validateUniquePorts(ports []int, name string) error {
|
||||
portMap := make(map[int]bool)
|
||||
for _, port := range ports {
|
||||
if _, ok := portMap[port]; ok {
|
||||
return fmt.Errorf("agent profile '%s' has duplicate port '%d', ports must be unique", name, port)
|
||||
}
|
||||
portMap[port] = true
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
|
|
@ -167,14 +167,3 @@ func validateUniqueProfileNames(profiles []*AgentPoolProfile) error {
|
|||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func validateUniquePorts(ports []int, name string) error {
|
||||
portMap := make(map[int]bool)
|
||||
for _, port := range ports {
|
||||
if _, ok := portMap[port]; ok {
|
||||
return fmt.Errorf("agent profile '%s' has duplicate port '%d', ports must be unique", name, port)
|
||||
}
|
||||
portMap[port] = true
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
|
|
@ -17,15 +17,15 @@ set -euo pipefail
|
|||
|
||||
exit_code=0
|
||||
|
||||
if ! hash gometalinter.v1 2>/dev/null ; then
|
||||
go get -u gopkg.in/alecthomas/gometalinter.v1
|
||||
gometalinter.v1 --install
|
||||
if ! hash gometalinter 2>/dev/null ; then
|
||||
go get -u github.com/alecthomas/gometalinter
|
||||
gometalinter --install
|
||||
fi
|
||||
|
||||
echo
|
||||
echo "==> Running static validations <=="
|
||||
# Run linters that should return errors
|
||||
gometalinter.v1 \
|
||||
gometalinter \
|
||||
--disable-all \
|
||||
--enable deadcode \
|
||||
--severity deadcode:error \
|
||||
|
@ -41,7 +41,7 @@ gometalinter.v1 \
|
|||
echo
|
||||
echo "==> Running linters <=="
|
||||
# Run linters that should return warnings
|
||||
gometalinter.v1 \
|
||||
gometalinter \
|
||||
--disable-all \
|
||||
--enable golint \
|
||||
--vendor \
|
||||
|
|
Загрузка…
Ссылка в новой задаче