Refine environment var

Address some review comments
This commit is contained in:
yuhan6665 2023-10-28 18:21:57 -04:00
parent 999bdc58d3
commit 11b61b02c8
4 changed files with 26 additions and 31 deletions

View file

@ -83,12 +83,8 @@ func ManagerType() interface{} {
var defaultBufferSize int32
func init() {
const key = "xray.ray.buffer.size"
const defaultValue = -17
size := platform.EnvFlag{
Name: key,
AltName: platform.NormalizeEnvName(key),
}.GetValueAsInt(defaultValue)
size := platform.NewEnvFlag(platform.BufferSize).GetValueAsInt(defaultValue)
switch size {
case 0: