The Go Programming Language
› http://golang.org/
› Go Playground
Go Projects
› Revel Web Framework
airlam

分享两个用 golang 做的 git commit 小工具--commitizen 和 validate-commit-msg

  •  
  •   airlam · Apr 2, 2019 · 4607 views
    This topic created in 2778 days ago, the information mentioned may be changed or developed.

    起因是不想装 nodejs 一堆包,也不喜欢 js。

    https://github.com/lintingzhen/commitizen-go

    https://github.com/lintingzhen/validate-commit-msg

    求试用,求喷。

    7 replies  •  2019-12-02 20:05:41 +08:00
    mritd
    mritd
    Apr 2, 2019
    2
    跟我当初的想法一样,只不过我当时跑偏了不少;先说一下已知问题:

    目前较成熟的 golang 终端 prompt 库对中文都有问题,survey 也是,在输入中文后删除、移动光标会有问题;其他的库可能更严重;而且目前这话总库在光标移动上都不友好,比如 ctrl + a/e 快速移动

    我当时脑子一热自己造了一个 promptx 库,基本上解决了这些问题,但是比如更多的列表模式,搜索等都没做;所以最近我尝试去修复 survey 这个问题( https://github.com/AlecAivazis/survey/pull/180),但是目前 PR 没回复了
    airlam
    airlam
    OP
    Apr 2, 2019
    3
    @mritd 握手。

    我注意到光标问题,曾经考虑过用 readline,不过用 c 比 go 麻烦不少,就作罢了;我还没注意到中文问题,survey 中的 select 的 option 设计不好,作者开了个新分支也不怎么更新。
    zeromake
    zeromake
    Apr 2, 2019
    4
    我也喜欢用 go 写命令行工具:github.com/zeromake/docker-debug
    不考虑搞个 brew 包吗?
    airlam
    airlam
    OP
    Apr 2, 2019
    5
    @zeromake 谢谢建议,我研究一下。
    zeromake
    zeromake
    Apr 2, 2019 via Android
    6
    follow 你了
    airlam
    airlam
    OP
    Dec 2, 2019
    7
    @zeromake 244 天,终于搞了一个 brew 包。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2262 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 26ms · UTC 00:20 · PVG 08:20 · LAX 16:20 · JFK 19:20
    ♥ Do have faith in what you're doing.