You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

使用Golang结合JetBrains终端添加超链接失败问题求助

Aurora库超链接使用问题排查

问题现象

我尝试了两种调用方式:

return au.Col.Hyperlink("foo", "https://example.com").String()
return au.Col.Hyperlink("foo", "https://example.com").HyperlinkTarget()

两种方式均无效——两种情况都是显示https://example.com,而foo被隐藏。

如果交换参数位置:

return au.Col.Hyperlink("https://example.com", "foo").String()
return au.Col.Hyperlink("https://example.com", "foo").HyperlinkTarget()

现在会显示foo,但foo完全无法点击。

环境配置

我使用的是aurora库,本地设置了别名以便开启/关闭颜色:

package au

import (
    "os"
    "github.com/logrusorgru/aurora/v4"
)

var colors = os.Getenv("vibe_with_color")
var hasColor = colors != "no"

var Col = aurora.New(aurora.WithColors(hasColor))

内容的提问来源于stack exchange,提问作者Alexander Mills

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.01 22:17:02