开发者社区 > 云原生 > Serverless > 正文

函数计算的go版本的SDK,在验函数计算 3.0,helloworld测试代码有错误怎么解决?

{
"RequestId": "1-658149d0-feb55212a84c170c3f74ead1",
"Code": "CAExited",
"Message": "Function instance exited unexpectedly(code 1, message:operation not permitted) with start command './main '.\nLogs:2023/12/19 15:44:16.845417 expected ali FC environment variables [FC_RUNTIME_API] are not defined"
}

函数计算的go版本的SDK,在验函数计算 3.0,helloworld测试代码有错误怎么解决?但是切换回 函数计算 2.0, 正常了。

展开
收起
小小鹿鹿鹿 2023-12-26 12:30:57 18 0
1 条回答
写回答
取消 提交回答
  • 起来你选择runtime类型为custom,却使用了golang runtime sdk。
    建议参考文档改代码,不要用go runtime sdk。此回答来自钉群阿里函数计算官网客户。

    2023-12-26 15:01:36
    赞同 展开评论 打赏

快速交付实现商业价值。

相关产品

  • 函数计算
  • 相关电子书

    更多
    All in Serverless 阿里云核心产品全面升级 立即下载
    AIGC 浪潮之上,森马的 Serverless 实践之旅 立即下载
    极氪大数据 Serverless 应用实践 立即下载