func getKeyNameFromDeploymentAndSubnet(subnetType SubnetType, deploymentType DeploymentType, keyNameMap map[SubnetType]string) string {
if (deploymentType == NoDeployment || deploymentType == PDBAWindows || deploymentType == AgentDeployment) {
return keyNameMap[subnetType]
}
else if (deploymentType == AnsibleDeployment) {
return "bar"
}
return "foo"
}
In the first if
statement, I get an error of missing return at end of function error. I don't get this error if I remove the else if
statement. Where am I going wrong?