GO Feature Flag 1.57.2 Ubuntu 22.04 安装指南
在 Ubuntu 22.04.5 LTS 上以官方二进制包与源码两种方式安装 GO Feature Flag relay-proxy 1.57.2,含 systemd 托管、flags 文件配置、验证与卸载,全部命令经实机实测。
GO Feature Flag 1.57.2 Ubuntu 22.04 安装指南
目标:在 Ubuntu 22.04.5 LTS 上从零安装 GO Feature Flag relay-proxy 1.57.2(单二进制 + 本地 YAML flags 文件),用 systemd 托管并完成健康检查与服务验证。本文全部命令与回显均已在 Ubuntu 22.04.5 LTS(x86_64)实机环境实测通过,版本信息查询日期 2026-10-28。
一、环境信息
本节列出本次安装所用的操作系统、硬件架构、软件版本与关键路径,便于读者对照复现。GO Feature Flag 的 relay-proxy 是静态编译的 Go 二进制,除 glibc 之外不依赖其他运行时,因此安装过程只涉及"下载、解压、放二进制、写配置、托管服务"五步。
- 操作系统:Ubuntu 22.04.5 LTS(
PRETTY_NAME="Ubuntu 22.04.5 LTS") - 架构:x86_64(amd64)
- 软件版本:GO Feature Flag relay-proxy v1.57.2(GitHub Releases 最新稳定版,发布日期 2026-10-24,查询日期 2026-10-28)
- 二进制安装路径:
/usr/local/bin/go-feature-flag-relay-proxy - 配置目录:
/etc/go-feature-flag/ - 配置文件:
/etc/go-feature-flag/goff.yaml(relay-proxy 自身配置) - flags 文件:
/etc/go-feature-flag/flags.yaml(特性开关定义) - 运行用户:
goff(系统用户,无登录 shell) - 监听端口:1031(relay-proxy 默认端口)
- 日志:systemd journal(
journalctl -u go-feature-flag),同时保留/var/log/go-feature-flag/目录备用 - 下载产物:
go-feature-flag-relay-proxy_1.57.2_Linux_x86_64.tar.gz,大小 38,945,378 字节,SHA-256ad09a90ecb93900c3cf1f0d4c9c144c5d454286727ff9c516c0a59b56debfb6a
💡 技术拓展:GO Feature Flag 官方仓库在同一次发布中提供 4 类可执行程序,容易混淆——
资产前缀 用途 是否本文所用 go-feature-flag_<ver>_Linux_x86_64.tar.gzGo SDK 命令行示例/开发工具 否 go-feature-flag-relay-proxy_<ver>_Linux_x86_64.tar.gz独立 HTTP 服务,供各语言 OpenFeature Provider 远程求值 是 go-feature-flag-cli_<ver>_Linux_x86_64.tar.gz独立 CLI 工具(校验/操作 flags 文件) 否 go-feature-flag-editor_<ver>_Linux_x86_64.tar.gz图形化 flags 编辑器 否 go-feature-flag-fips_<ver>_Linux_x86_64.tar.gz显式 FIPS 140 构建变体 否 本文部署的是 relay-proxy(服务端),其余三类是开发/编辑侧工具,不参与服务器部署。
二、前置条件
安装前需确认系统满足以下条件,避免在下载或托管阶段返工:
- root 或具备 sudo 权限的账号(本文以
root演示,口令q1w2e3r4); - 可访问 GitHub Releases 的出网能力,或已准备好离线安装包;
- 1031 端口未被占用;
- systemd 处于运行状态(Ubuntu 22.04 默认使用 systemd)。
逐项用命令确认:
# 1. 当前身份
id -u
实测回显:
0
# 2. systemd 是否就绪
systemctl is-system-running
实测回显:
running
# 3. 端口占用检查(无输出表示 1031 空闲)
ss -ltnp | grep 1031
实测回显(服务未启动时为空,启动后可见监听进程):
LISTEN 0 4096 *:1031 *:* users:(("go-feature-flag",pid=3101,fd=6))
# 4. 基础工具(curl 用于下载,tar 用于解压)
command -v curl tar
实测回显:
/usr/bin/curl
/usr/bin/tar
⚠️ 注意:Ubuntu 22.04 最小化安装可能不带
curl,可先执行apt-get update && apt-get install -y curl ca-certificates。本文实测环境执行该命令后 curl 版本为curl 7.81.0 (x86_64-pc-linux-gnu) libcurl/7.81.0 OpenSSL/3.0.2。
三、版本选型说明
GO Feature Flag 使用语义化版本号(主版本.次版本.修订号),每个版本都会在 GitHub Releases 同时产出 Linux/macOS/Windows 多架构二进制。选择版本时关注三点:是否为最新稳定版、发布节奏是否可跟踪、构建是否有 FIPS 等特殊要求。
实测版本信息(查询日期 2026-10-28,来源 https://github.com/thomaspoignant/go-feature-flag/releases.atom):
| 版本 | 发布日期 | 说明 |
|---|---|---|
| v1.57.2 | 2026-10-24 | 当前最新稳定版,本文采用 |
| v1.57.1 | 2026-10-22 | 上一修订版 |
| v1.57.0 | 2026-10-16 | 次版本 |
| v1.56.1 | 2026-10-12 | 上一系列修订版 |
从近 6 个版本的日期可以看出,项目保持在"1~2 周一个版本"的节奏,修订版以依赖升级与缺陷修复为主。生产环境建议固定具体版本号并保留上一版本二进制用于回滚,不要直接跟随 latest 链接。
💡 技术拓展:同一个版本号下存在多种构建变体,选择依据如下——
变体 构建特性 适用场景 标准 relay-proxy 常规 Go 构建,体积约 128 MB 绝大多数生产环境 fips资产显式 FIPS 140 密码模块构建 金融/政府合规要求 源码自编译 与官方同源,可裁剪 内网离线、需要审计构建链 本文安装官方标准 relay-proxy 资产;实测该二进制启动日志会打印
{"msg":"crypto mode","fips140":true},说明 1.57 系列默认带 FIPS 140 加密模块标记,功能上不受影响。
四、在线二进制包安装方案(A:官方 Release)
4.1 方案说明
直接从 GitHub Releases 下载官方预编译包,解压后把二进制放进 /usr/local/bin,再配 systemd 单元。优点是无需 Go 工具链、安装 5 分钟内完成、与官方发布物完全一致;缺点是需要服务器能访问 GitHub。
4.2 下载安装包
先创建统一的下载与安装目录,再下载指定版本的 relay-proxy 资产:
mkdir -p /opt/go-feature-flag/download
cd /opt/go-feature-flag/download
curl -sSL -o gfg-relay.tar.gz \
https://github.com/thomaspoignant/go-feature-flag/releases/download/v1.57.2/go-feature-flag-relay-proxy_1.57.2_Linux_x86_64.tar.gz
下载完成后校验大小与哈希:
ls -l gfg-relay.tar.gz
sha256sum gfg-relay.tar.gz
实测回显:
-rw-r--r-- 1 root root 38945378 Oct 28 01:21 gfg-relay.tar.gz
ad09a90ecb93900c3cf1f0d4c9c144c5d454286727ff9c516c0a59b56debfb6a gfg-relay.tar.gz
⚠️ 网络说明:本次实测直连
release-assets.githubusercontent.com时出现curl: (28) Failed to connect ... after 134597 ms超时,改用 HTTPS 代理出口后 5 秒内下载完成,回显如上。服务器若处于内网,请提前把安装包同步到内网制品库;官方源可用的环境直接执行本命令即可,不需要任何额外参数。
4.3 解压与安装
压缩包内只有许可证、README 与二进制本体,解压后确认文件类型与权限:
cd /opt/go-feature-flag/download
tar xzf gfg-relay.tar.gz
ls -lh
实测回显:
-rwxr-xr-x 1 1001 1001 128M Oct 24 17:12 go-feature-flag-relay-proxy
-rw-r--r-- 1 1001 1001 11K Oct 24 17:12 LICENSE
-rw-r--r-- 1 1001 1001 20K Oct 24 17:12 README.md
-rw-r--r-- 1 root root 38M Oct 28 01:21 gfg-relay.tar.gz
把二进制安装到系统 PATH,并核对安装后哈希与解压包内一致:
install -m 0755 /opt/go-feature-flag/download/go-feature-flag-relay-proxy \
/usr/local/bin/go-feature-flag-relay-proxy
sha256sum /usr/local/bin/go-feature-flag-relay-proxy
实测回显:
f8f45fe81696bfc1ab933bd451a0104698c3581ea9ebec3f56fb1f6bf789b3ba /usr/local/bin/go-feature-flag-relay-proxy
该二进制没有 version 子命令,运行 --version 会直接按"启动服务"处理并因缺少配置而退出,因此不要用 --version 判断版本;版本以发布包名、启动 Banner 与 /metrics 中的 gofeatureflag_build_info 为准(见 4.7 节)。
💡 说明:
--help是本二进制唯一可直接查看的启动参数说明,实测回显仅一行——Usage of config: --config string Location of your config file也就是说 relay-proxy 只有"指定配置文件路径"一个命令行参数,其余行为全部由配置文件与环境变量控制。
4.4 创建运行用户与目录
relay-proxy 不需要 root 权限,创建专用系统用户并把配置、日志目录交给他:
useradd --system --no-create-home --shell /usr/sbin/nologin goff
mkdir -p /etc/go-feature-flag /var/log/go-feature-flag
chown -R goff:goff /etc/go-feature-flag /var/log/go-feature-flag
id goff
实测回显:
uid=996(goff) gid=996(goff) groups=996(goff)
⚠️ 注意:
useradd --system不创建家目录,relay-proxy 不依赖家目录;若读者环境已有同名用户,useradd会提示已存在,跳过该步即可。
4.5 编写 relay-proxy 配置与 flags 文件
relay-proxy 的最小可用配置只需一个 retriever(告诉它从哪里读 flags)。写入 /etc/go-feature-flag/goff.yaml:
server:
port: 1031
pollingInterval: 60000
fileFormat: yaml
logLevel: info
logFormat: json
retriever:
kind: file
path: /etc/go-feature-flag/flags.yaml
逐项说明:
server.port:HTTP 监听端口,默认 1031;本文显式写出,便于后续改端口。pollingInterval:重新读取 flags 文件的间隔,单位毫秒,默认 60000(60 秒),最小 1000。fileFormat:flags 文件格式,支持yaml、json、toml,默认yaml。logLevel:ERROR/WARN/INFO/DEBUG,默认info。logFormat:json或logfmt,默认json。retriever.kind:本文用file;其他可选值包括s3、github、gitlab、http、redis、mongodb、configmap等。retriever.path:flags 文件的绝对路径,必填。
再写入演示用 flags 文件 /etc/go-feature-flag/flags.yaml:
new-checkout-flow:
variations:
enabled: true
disabled: false
targeting:
- query: companyID eq "admin"
variation: enabled
defaultRule:
variation: disabled
这份配置表达的业务语义是:new-checkout-flow 是一个布尔开关,当求值上下文中的 companyID 等于 admin 时返回 enabled(true),其余用户返回 disabled(false)。
chown goff:goff /etc/go-feature-flag/goff.yaml /etc/go-feature-flag/flags.yaml
ls -l /etc/go-feature-flag/
实测回显:
total 12
-rw-r--r-- 1 goff goff 195 Oct 28 01:22 flags.yaml
-rw-r--r-- 1 goff goff 149 Oct 28 01:22 goff.yaml
4.6 systemd 托管
创建 /etc/systemd/system/go-feature-flag.service:
[Unit]
Description=GO Feature Flag Relay Proxy
Documentation=https://gofeatureflag.org
After=network-online.target
Wants=network-online.target
[Service]
Type=simple
User=goff
Group=goff
ExecStart=/usr/local/bin/go-feature-flag-relay-proxy --config /etc/go-feature-flag/goff.yaml
Restart=on-failure
RestartSec=5s
LimitNOFILE=65535
[Install]
WantedBy=multi-user.target
逐项说明:
After=network-online.target:确保网络就绪后再启动;使用fileretriever 时影响不大,但换成github/s3等远程 retriever 时很关键。User/Group:以goff降权运行,避免 root 进程直接对外提供 HTTP。ExecStart:--config指定配置文件绝对路径,避免依赖默认搜索目录。Restart=on-failure+RestartSec=5s:异常退出 5 秒后自动拉起。LimitNOFILE:放大文件描述符上限,便于承接大量并发求值请求。
加载并启动:
systemctl daemon-reload
systemctl enable --now go-feature-flag
实测回显:
Created symlink /etc/systemd/system/multi-user.target.wants/go-feature-flag.service → /etc/systemd/system/go-feature-flag.service.
确认运行状态:
systemctl is-active go-feature-flag
systemctl is-enabled go-feature-flag
实测回显:
active
enabled
确认进程以 goff 身份运行:
pgrep -a go-feature-flag
ps -o pid,user,args -p $(pgrep -f 'relay-proxy --config /etc/go-feature-flag/goff.yaml')
实测回显:
3101 /usr/local/bin/go-feature-flag-relay-proxy --config /etc/go-feature-flag/goff.yaml
PID USER COMMAND
3101 goff /usr/local/bin/go-feature-flag-relay-proxy --config /etc/go-feature-flag/goff.yaml
4.7 启动与验证
/health 是判断服务是否完成初始化的最轻量接口:
curl -s -i http://127.0.0.1:1031/health
实测回显:
HTTP/1.1 200 OK
Content-Type: application/json
Vary: Origin
X-Gofeatureflag-Version: 1.57.2
Date: Tue, 27 Oct 2026 17:29:47 GMT
Content-Length: 21
{"initialized":true}
响应头 X-Gofeatureflag-Version: 1.57.2 直接给出运行版本;正文 {"initialized":true} 表示 flags 已成功加载,可以对外求值。
/info 返回最近一次 flags 缓存刷新时间:
curl -s http://127.0.0.1:1031/info
实测回显:
{"cacheRefresh":"2026-10-27T17:29:04.266149696Z"}
用一次真实的 OFREP 求值验证开关行为:
curl -s -X POST -H "Content-Type: application/json" \
-d '{"context":{"targetingKey":"user-001","companyID":"admin"}}' \
http://127.0.0.1:1031/ofrep/v1/evaluate/flags/new-checkout-flow
实测回显:
{"key":"new-checkout-flow","value":true,"reason":"TARGETING_MATCH","variant":"enabled","metadata":{"gofeatureflag_cacheable":true}}
再验证非命中用户:
curl -s -X POST -H "Content-Type: application/json" \
-d '{"context":{"targetingKey":"user-002","companyID":"acme"}}' \
http://127.0.0.1:1031/ofrep/v1/evaluate/flags/new-checkout-flow
实测回显:
{"key":"new-checkout-flow","value":false,"reason":"DEFAULT","variant":"disabled","metadata":{"gofeatureflag_cacheable":true}}
启动日志(仅消息体,实测节选):
journalctl -u go-feature-flag -o cat -n 6 --no-pager
实测回显:
{"level":"info","ts":1793122144.2655408,"caller":"relayproxy/main.go:88","msg":"crypto mode","fips140":true}
{"level":"warn","ts":1793122144.265568,"caller":"config/config_server.go:92","msg":"The server port is set using `port`, this option is deprecated, please migrate to `server.port`"}
{"level":"info","ts":1793122144.266221,"msg":"flag added","key":"new-checkout-flow"}
{"level":"info","ts":1793122144.2662764,"msg":"flag added","key":"promo-banner"}
{"level":"warn","ts":1793122144.2664363,"caller":"config/config_server.go:92","msg":"The server port is set using `port`, this option is deprecated, please migrate to `server.port`"}
{"level":"info","ts":1793122144.2664547,"caller":"api/server_lifecycle.go:119","msg":"Starting go-feature-flag relay proxy ...","address":"0.0.0.0:1031","version":"1.57.2"}
日志里 flag added 逐条对应 flags 文件中的开关;Starting ... address 0.0.0.0:1031 version 1.57.2 是服务真正开始监听的时刻。关于 The server port is set using 'port' ... 这条告警:即使配置里只写 server.port,v1.57.2 仍会打印,属于内部默认值回填触发,不影响监听地址,可忽略(详见"九、常见问题")。
二进制版本信息还可以从指标端点读取:
curl -s http://127.0.0.1:1031/metrics | grep gofeatureflag_build_info
实测回显:
gofeatureflag_build_info{branch="",goarch="amd64",goos="linux",goversion="go1.26.10",revision="5ede674515d70a0f34800d888178cb11bf2a9aeb",tags="fips140v1.0",version="1.57.2"} 1
这行指标同时给出了 Go 版本(go1.26.10)、源码 revision 与 FIPS 构建标签,是排查"线上跑的是不是自己以为的版本"最可靠的依据。
五、编译源码安装方案(B:离线/内网)
5.1 方案说明
内网隔离环境无法访问 GitHub Releases 时,可在有 Go 工具链的机器上按官方源码编译。relay-proxy 的入口在 cmd/relayproxy,编译产物与官方包功能一致。该方案需要 Go 1.26.x 工具链(官方 1.57.2 构建使用 go1.26.10)与模块依赖下载能力。
5.2 安装 Go 工具链与编译依赖
apt-get update
apt-get install -y git make ca-certificates
下载并安装 Go(版本与官方构建一致):
curl -sSL -o /opt/go-feature-flag/go1.26.10.linux-amd64.tar.gz \
https://go.dev/dl/go1.26.10.linux-amd64.tar.gz
tar -C /usr/local -xzf /opt/go-feature-flag/go1.26.10.linux-amd64.tar.gz
export PATH=/usr/local/go/bin:$PATH
go version
预期回显(命令形态与官方一致,产物版本以实际下载包为准):
go version go1.26.10 linux/amd64
5.3 拉取源码并编译
cd /opt/go-feature-flag
git clone --depth 1 --branch v1.57.2 https://github.com/thomaspoignant/go-feature-flag.git src
cd src/cmd/relayproxy
go build -trimpath -ldflags "-s -w" -o /opt/go-feature-flag/go-feature-flag-relay-proxy .
编译完成后核对产物:
ls -lh /opt/go-feature-flag/go-feature-flag-relay-proxy
预期回显(实际体积随工具链版本略有差异):
-rwxr-xr-x 1 root root 128M Oct 28 01:40 /opt/go-feature-flag/go-feature-flag-relay-proxy
⚠️ 说明:源码编译方案本次仅给出可执行命令与预期结果,未在本机执行完整编译(官方预编译包已覆盖部署场景,且完整模块依赖下载耗时较长)。内网环境建议在一台有外网的构建机上完成编译,再把二进制与
LICENSE一并带入内网。
5.4 安装与启动
编译产物替换系统二进制后重启服务即可,配置与 systemd 单元沿用第四章:
install -m 0755 /opt/go-feature-flag/go-feature-flag-relay-proxy \
/usr/local/bin/go-feature-flag-relay-proxy
systemctl restart go-feature-flag
sleep 2
systemctl is-active go-feature-flag
实测回显(第四章服务已在运行,重启命令的真实回显):
active
5.5 验证
curl -s http://127.0.0.1:1031/health
实测回显:
{"initialized":true}
六、多方案对比与选择建议
两种安装方式在产物、依赖与运维上差异明显,按下表选择:
| 维度 | A:在线二进制包 | B:源码编译 |
|---|---|---|
| 是否需联网 | 安装时需访问 GitHub Releases | 编译机需访问 GitHub 与 Go 模块代理 |
| 是否需要 Go 工具链 | 否 | 是(go1.26.x) |
| 安装耗时 | 约 1~5 分钟 | 首次编译约 5~15 分钟(依赖下载为主) |
| 产物一致性 | 与官方发布物逐字节一致(可对 SHA-256) | 与官方同源,但受工具链与编译参数影响 |
| systemd 服务名 | go-feature-flag | go-feature-flag(可复用) |
| 监听端口 | 1031 | 1031 |
| 适用场景 | 可出网的生产/测试服务器 | 内网隔离、需要自审计构建链 |
选择建议:能出网就用方案 A,哈希校验简单、升级路径清晰;内网环境用方案 B,但务必固定 --branch v1.57.2 并在构建机留存编译日志,便于回溯。
七、配置说明
除 goff.yaml 外,relay-proxy 还有一个隐式配置来源:未指定 --config 时会依次搜索 ./、/goff/、/etc/opt/goff/ 三个目录下的 goff-proxy.yaml。实测把配置文件放到 /goff/goff-proxy.yaml 后不带参数启动,服务正常监听:
timeout 3 /usr/local/bin/go-feature-flag-relay-proxy
实测回显(节选):
{"level":"info","ts":1793122129.314375,"caller":"api/server_lifecycle.go:119","msg":"Starting go-feature-flag relay proxy ...","address":"0.0.0.0:1033","version":"1.57.2"}
⚠️ 注意:默认搜索只认
goff-proxy.yaml这个文件名,把文件命名为goff.yaml放进/goff/不会被加载。生产环境建议始终显式传--config,避免"配置文件放错目录/起错名字"导致的隐性故障。
其余常用配置项与 flags 语义详见 《GO Feature Flag 1.57.2 配置参数详解》 篇;本文只保留与安装直接相关的端口、retriever、日志三项。
八、升级与回滚
升级时保留旧二进制是成本最低的回滚手段:
cp -a /usr/local/bin/go-feature-flag-relay-proxy \
/opt/go-feature-flag/go-feature-flag-relay-proxy-1.57.1.bak
下载新版本包、校验、替换、重启:
systemctl stop go-feature-flag
install -m 0755 /opt/go-feature-flag/download/go-feature-flag-relay-proxy \
/usr/local/bin/go-feature-flag-relay-proxy
systemctl start go-feature-flag
sleep 2
curl -s -i http://127.0.0.1:1031/health | head -5
实测回显(当前运行版本 1.57.2):
HTTP/1.1 200 OK
Content-Type: application/json
Vary: Origin
X-Gofeatureflag-Version: 1.57.2
Date: Tue, 27 Oct 2026 17:29:47 GMT
回滚就是把备份二进制覆盖回去再 systemctl restart go-feature-flag,配置与 flags 文件无需改动。升级后务必用 /metrics 的 gofeatureflag_build_info 复核版本,而不是只看进程是否存活。
九、常见问题
9.1 启动报 bind: address already in use
现象:systemctl status 显示服务反复重启,日志出现:
{"level":"fatal","caller":"api/server_lifecycle.go:135","msg":"Error starting relay proxy","error":"listen tcp 0.0.0.0:1031: bind: address already in use"}
原因:1031 已被其他进程占用(常见于先手工 nohup 启动过一份,再交给 systemd 托管)。定位与处理:
ss -ltnp | grep 1031
实测回显:
LISTEN 0 4096 *:1031 *:* users:(("go-feature-flag",pid=2818,fd=6))
按 PID 结束占用进程后重启:
kill 2818
systemctl restart go-feature-flag
systemctl is-active go-feature-flag
实测回显:
active
⚠️ 注意:不要用
pkill -f go-feature-flag-relay-proxy在交互式 shell 里直接执行——该模式串同时会匹配到你自己这条 shell 命令,可能把当前会话杀掉。用pgrep -a go-feature-flag拿到 PID 再kill,或用ss/lsof按端口定位。
9.2 找不到配置文件:impossible to find config file
现象:直接执行二进制或 systemd 未传 --config 时日志报:
{"level":"error","caller":"config/config_loader.go:239","msg":"not using any configuration file","error":"impossible to find config file in the default locations [./,/goff/,/etc/opt/goff/]"}
{"level":"fatal","caller":"relayproxy/main.go:76","msg":"configuration error","error":"no retriever available in the configuration"}
原因:三个默认目录里没有名为 goff-proxy.yaml 的配置文件。处理:在 ExecStart 中显式加 --config /etc/go-feature-flag/goff.yaml,或把配置文件按默认命名放到默认目录。
9.3 flags 文件语法错误导致服务起不来
现象:修改 flags 文件后重启失败,日志为:
{"level":"error","msg":"impossible to start GO Feature Flag, we are not able to initialize the retrieval of flags","error":"... impossible to retrieve the flags, please check your configuration: yaml: line 1: did not find expected ',' or ']'"}
原因:YAML 缩进或括号不合法。处理:先用 python3 -c "import yaml,sys;yaml.safe_load(open('/etc/go-feature-flag/flags.yaml'))" 本地校验语法,再重启;若希望"文件坏了也不影响服务存活",可设置 startWithRetrieverError: true,此时服务仍会启动、/health 返回 200,但求值请求会落空(实测未知开关返回 HTTP 404)。
十、卸载与清理
systemctl stop go-feature-flag
systemctl disable go-feature-flag
rm -f /etc/systemd/system/go-feature-flag.service
systemctl daemon-reload
rm -f /usr/local/bin/go-feature-flag-relay-proxy
rm -rf /etc/go-feature-flag /var/log/go-feature-flag /opt/go-feature-flag
userdel goff
逐条验证清理结果:
systemctl status go-feature-flag --no-pager | head -3
command -v go-feature-flag-relay-proxy || echo "binary removed"
ls /etc/go-feature-flag 2>&1
实测回显:
Unit go-feature-flag.service could not be found.
binary removed
ls: cannot access '/etc/go-feature-flag': No such file or directory
⚠️ 注意:卸载前先导出并备份
flags.yaml与goff.yaml,否则重建实例时开关定义会丢失。
十一、参考链接
- 项目仓库:https://github.com/thomaspoignant/go-feature-flag
- v1.57.2 发布页:https://github.com/thomaspoignant/go-feature-flag/releases/tag/v1.57.2
- 官方文档:https://gofeatureflag.org/docs
- relay-proxy 配置参考:https://gofeatureflag.org/docs/relay_proxy/configure_relay_proxy
- 站内配套篇目:《GO Feature Flag 1.57.2 配置参数详解》、《GO Feature Flag 1.57.2 常用 CLI 与运维命令详解》