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 · 4226 views
    This topic created in 2625 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
        1
    mritd  
       Apr 2, 2019
    mritd
        2
    mritd  
       Apr 2, 2019
    跟我当初的想法一样,只不过我当时跑偏了不少;先说一下已知问题:

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

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

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