我想apiEndpoint()在调用/退出子函数时结束父函数的执行apiResponse()
func apiEndpoint() {
if false {
apiResponse("error")
// I want apiResponse() call to return (end execution) in parent func
// so next apiResponse("all good") wont be executed
}
apiResponse("all good")
}
func apiResponse(message string) {
// returns message to user via JSON
}
元芳怎么了
暮色呼如
相关分类