Share the interspersed flag parser between subenum and wordlist-gen
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
首先在 main.go 和 tools/wordlist-gen.go 中找到 parseInterspersed 和 endsWithTerminator 的重复定义,以及它们在 main_test.go 和 tools/wordlist-gen_test.go 中的对应测试。创建 internal/cliargs 包,对外暴露 cliargs.Parse(fs *flag.FlagSet, args []string) ([]string, error),将两个程序都指向该包,并删除本地副本。当新的包下存在 flag 后置位置参数测试和 -- 终止符测试,且 go test ./... 全部通过时,即完成。
由索引模型根据 Issue 内容生成。
描述
What
parseInterspersed and endsWithTerminator exist twice: in main.go and, since #133, in tools/wordlist-gen.go. Both are package main, so they could not import each other.
How
- Move the two functions into a small package, for example
internal/cliargs, ascliargs.Parse(fs *flag.FlagSet, args []string) ([]string, error). - Use it from both programs and delete the copies.
- Move or add the tests for flags after positionals and the
--terminator (seemain_test.goandtools/wordlist-gen_test.go).
Done when
One implementation, used by both programs, with its own tests; go test ./... passes.
- 主要语言
- Go
- 星标
- 1
- 派生
- 1
- 平均合并
- 5 天 2 小时
- 30 天内合并 PR
- 3
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 提供 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
TMHSDigital/subenum 的其他 Issue
-
community documentation good first issue
难度 2/5 1-3 小时 新手友好度 85/100
TMHSDigital/subenum#135 ·
维护者通常 1 天内回复
-
area: dns enhancement good first issue
难度 2/5 1 小时以内 新手友好度 90/100
TMHSDigital/subenum#134 ·
维护者通常 1 天内回复
-
community marketing priority: low
难度 5/5 一周以上 新手友好度 35/100
TMHSDigital/subenum#132 · 1 条评论 ·
维护者通常 1 天内回复
-
feature priority: low
难度 5/5 一周以上 新手友好度 35/100
TMHSDigital/subenum#131 ·
维护者通常 1 天内回复
-
documentation marketing priority: medium
难度 5/5 一周以上 新手友好度 25/100
TMHSDigital/subenum#127 ·
维护者通常 1 天内回复
查看 TMHSDigital/subenum 的全部 Issue
相似的 Issue
-
难度 1/5 1 小时以内 新手友好度 88/100
-
难度 2/5 1-3 小时 新手友好度 67/100
vanderheijden86/b9s#20 ·
-
go-battery needs an ndsctl on PATH: TestPurchaseSessionGuardHoldsThroughTheOutcomeUnknownWindow fails on bare hosts (passes with stub)可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
OpenTollGate/tollgate-module-basic-go#726 ·
维护者通常 1 天内回复
-
ux waiting for feedback
难度 2/5 1-3 小时 新手友好度 63/100
维护者通常 1 天内回复
-
phase:v3 type:harness
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复