Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs: add trpc-go framework configuration #22

Merged
merged 2 commits into from
Sep 15, 2023

Conversation

WineChord
Copy link
Contributor

No description provided.

@WineChord
Copy link
Contributor Author

主库的 config 目录下的 README 放了业务配置相关的内容,框架配置就暂时放到 docs 中了

export port=8888
```

由于框架配置会解析 `$` 符号,所以用户配置时,除了占位符以外,不要包含 `$` 字符,比如 redis/mysql 等密码不要包含 `$`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This requirement shouldn't be mandatory, right?

// ExpandEnv looks for ${var} in s and replaces them with value of the corresponding environment variable.
// It's not like os.ExpandEnv which handles both ${var} and $var.
// $var is considered invalid, since configurations like password for redis/mysql may contain $.
func ExpandEnv(s []byte) []byte {
// ...
}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个意思大概说的是 ExpandEnv 只查 ${} 不查 $,所以 password 严格意义上来讲应该是不能包含 ${xx} 这种形式

@sandyskies sandyskies merged commit 97d8615 into trpc-group:main Sep 15, 2023
5 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators Sep 15, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants