惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

人人都是产品经理
人人都是产品经理
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
P
Privacy International News Feed
Simon Willison's Weblog
Simon Willison's Weblog
I
Intezer
Spread Privacy
Spread Privacy
The Hacker News
The Hacker News
P
Palo Alto Networks Blog
TaoSecurity Blog
TaoSecurity Blog
S
Secure Thoughts
Google Online Security Blog
Google Online Security Blog
H
Heimdal Security Blog
N
News | PayPal Newsroom
Attack and Defense Labs
Attack and Defense Labs
Recent Commits to openclaw:main
Recent Commits to openclaw:main
博客园 - 【当耐特】
Webroot Blog
Webroot Blog
小众软件
小众软件
Help Net Security
Help Net Security
D
Darknet – Hacking Tools, Hacker News & Cyber Security
N
News and Events Feed by Topic
Hacker News - Newest:
Hacker News - Newest: "LLM"
PCI Perspectives
PCI Perspectives
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
The Cloudflare Blog
Cloudbric
Cloudbric
AI
AI
WordPress大学
WordPress大学
博客园 - 聂微东
Jina AI
Jina AI
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
博客园 - 三生石上(FineUI控件)
Hacker News: Ask HN
Hacker News: Ask HN
H
Hacker News: Front Page
博客园 - Franky
V
V2EX
Schneier on Security
Schneier on Security
G
GRAHAM CLULEY
S
SegmentFault 最新的问题
有赞技术团队
有赞技术团队
H
Help Net Security
量子位
S
Security @ Cisco Blogs
大猫的无限游戏
大猫的无限游戏
cs.AI updates on arXiv.org
cs.AI updates on arXiv.org
Recorded Future
Recorded Future
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
J
Java Code Geeks
C
Cisco Blogs
S
Security Affairs

编程笔记

AI|AI面试题,AI来解答 译|为什么 TypeScript 7.0 用 Go 重写 解决Fish Shell中使用vfox报错,Lacks hook support 股票配债缴款操作指南 Deepseek大模型越狱/破甲提示词 用DeepSeek-V4-Pro大模型写长篇小说,网文 全网寻找的同花顺板块同列网页版来了!盯盘效率提升 5 倍的黑科技 等一个黄金坑:中海物业跌到什么价位,到手股息率能有6%? Claude Code(1)在 WSL Ubuntu 上安装和配置指南 (译)AI 裁员潮:亚马逊、微软等科技巨头将 2025 年裁员归因于人工智能 AI|L2和L3级自动驾驶有什么区别 AI|Gemini CLI 实用技巧与窍门 AI|Gemini CLI Tips & Tricks 限制 Microsoft Edge 浏览器的内存占用 (Repost)4.3 Million Browsers Infected,Inside ShadyPanda's 7-Year Malware Campaign (译)430万浏览器被感染,揭秘 ShadyPanda 持续 7 年的恶意软件活动 github Fine-grained personal access token 使用 必应搜索屏蔽垃圾网站 译|Linux 启动过程:从按下电源到内核 独立开发:AI图生图获得第一位付费用户,现在支持在线支付了 译|面试官引诱我安装恶意软件(我是如何在一次“工作面试”中差点被黑的) 译|在 Go 中防止 CSRF 的现代方法,CrossOriginProtection AI图生图:释放你的无限创造力,免费在线生成惊艳图像 AI & Tech 最新发展 AI|Gemini CLI,自定义斜杠命令(译) AI|Gemini CLI,Custom slash commands(转载)
Serverless|在阿里云FC上部署Go,构建环境中GO版本的切换
本文作者: yigmmk · 2025-09-11 · via 编程笔记

FC的运行环境custom.debian10和fc构建流水线中默认的go版本为1.18,已经大幅落后,这里介绍下如何修改构建环境中的go版本

脚本

1
2
3
4
5
6
7

rm -rf /usr/local/go

wget https://golang.google.cn/dl/go1.23.12.linux-amd64.tar.gz
sudo tar -C /usr/local -xzf go1.23.12.linux-amd64.tar.gz

export PATH=/usr/local/go/bin:$PATH

只需在 pre-deploy 步骤中执行这段脚本即可

配置文件

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
















edition: 1.0.0
name: web-framework-app



access: 'undefined'

vars:
region: 'cn-hangzhou'
service:
name: 'demo-api'
description: 'Serverless Devs Web Framework Service'

services:
framework:



component: fc
actions:
pre-deploy:
- run: |
rm -rf /usr/local/go
wget https://golang.google.cn/dl/go1.23.12.linux-amd64.tar.gz
sudo tar -C /usr/local -xzf go1.23.12.linux-amd64.tar.gz
export PATH=/usr/local/go/bin:$PATH
go version
go mod tidy
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -o main main.go
path: ./code
props:
region: ${vars.region}
service: ${vars.service}
function:
name: 'demo-function'
description: 'Serverless Devs Web Framework Function'
codeUri: ./code
runtime: custom.debian10
memorySize: 1024
timeout: 30
instanceConcurrency: 100
caPort: 8080
customRuntimeConfig:
command:
- '/code/main'
triggers:
- name: httpTrigger
type: http
config:
authType: anonymous
methods:
- GET
- POST
- PUT
- DELETE
- HEAD
- OPTIONS
customDomains:
- domainName: auto
protocol: HTTP
routeConfigs:
- path: /*

参考