You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
WriteHelp function will auto wrap and align the description that longer than terminal's width.
When multi-byte character in the description, like emoji or Chinese, the wrapping will be wrong.
@JasonMing I'm unable to duplicate this issue in Linux, and Windows 11. In a Command Prompt window on Windows 11, the heart is there, but isn't red. In a Windows Terminal window, the heart is there.
Even inside an ssh session on Windows, the heart appears ok (albeit it shows as grey, not red).
What OS/version/terminal app are you running this code on?
package main
import (
"os"
"github.com/jessevdk/go-flags"
)
func main() {
var opt struct {
WorkerId uint64 `short:"w" long:"worker" description:"01234567891123456789212345678931234567894123456789512345678961❤3456789"`
}
p := flags.NewParser(&opt, flags.HelpFlag|flags.PrintErrors)
p.WriteHelp(os.Stdout)
}
WriteHelp
function will auto wrap and align the description that longer than terminal's width.When multi-byte character in the description, like emoji or Chinese, the wrapping will be wrong.
Output:
The text was updated successfully, but these errors were encountered: