set "app_root" from environment variables
还没有人认领这个 Issue。
评估
调研方向
从 refresh/config.go 中的 Load 函数开始,检查 YAML 如何填充 Configuration.AppRoot。验证 app_root 值的环境变量展开,包括文档中说明的 $GOPATH 和 $APP_PATH 形式;当加载配置能够正确解析这些变量时,即表示完成。
由索引模型根据 Issue 内容生成。
描述
Hey,
I think it would be nice to be able to set the app_root from environment variables like this:
app_root: "$GOPATH/src/$APP_PATH"
It should be pretty easy to implement this, there just would need to be a call to os.ExpandEnv(c.AppRoot) at the end of the Load function. E.g.:
func (c *Configuration) Load(path string) error {
data, err := ioutil.ReadFile(path)
if err != nil {
return err
}
err = yaml.Unmarshal(data, c)
if err != nil {
return err
}
c.AppRoot = os.ExpandEnv(c.AppRoot)
return err
}
- 主要语言
- Go
- 星标
- 196
- 派生
- 32
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
markbates/refresh 的其他 Issue
-
难度 1/5 1 小时以内 新手友好度 62/100
-
难度 3/5 1-2 天 新手友好度 35/100
-
codesign for osx未关闭
难度 4/5 3-5 天 新手友好度 25/100
-
init not working on macOS可能已有人在做 @hlubek 于 2457 天前认领。 未关闭
难度 3/5 1-2 天 新手友好度 35/100
-
难度 4/5 3-5 天 新手友好度 35/100
查看 markbates/refresh 的全部 Issue
相似的 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 84/100
维护者通常 1 天内回复
-
Mend: dependency security vulnerability
难度 2/5 1-3 小时 新手友好度 72/100
kube-tarian/sigrun#202 ·
-
good first issue help wanted
难度 2/5 1-3 小时 新手友好度 82/100
eugenioenko/ttt#1085 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 62/100
fullsend-ai/fullsend#8688 · 1 条评论 ·
维护者通常 1 天内回复
-
question raised-by:verifier
难度 2/5 1-3 小时 新手友好度 72/100
medici-finance/assay#4013 ·
维护者通常 1 天内回复