golang/go

os: ExpandEnv: Missing curly bracket at end of string substitutes var name whether or not env var is set

Open

#35,752 创建于 2019年11月21日

在 GitHub 查看
 (10 评论) (2 反应) (0 负责人)Go (19,008 fork)batch import
DocumentationNeedsFixhelp wanted

仓库指标

Star
 (133,883 star)
PR 合并指标
 (30 天内没有已合并 PR)

描述

What version of Go are you using (go version)?

and

Does this issue reproduce with the latest release?

Yes. (Go Playground)

What operating system and processor architecture are you using (go env)?

What did you do?

https://play.golang.org/p/GSfBKiZqj2L

What did you expect to see?

Either

Hello, ${name
Hello, ${name

or

Hello, ${name
Hello, foo

What did you see instead?

Hello, name
Hello, name

贡献者指南