go-archaius icon indicating copy to clipboard operation
go-archaius copied to clipboard

[]string 字符串切片解析会出错

Open mi4tin opened this issue 5 years ago • 3 comments

mi4tin avatar May 23 '19 04:05 mi4tin

请详细描述

tianxiaoliang avatar May 23 '19 08:05 tianxiaoliang

比如有yaml字段:IPWhiteList []string yaml:"ipWhiteList"。 yaml为: restGate: listenAddress: "127.0.0.1:6001" ipWhiteList: - "127.0.0.1" - "127.0.0.2"会在config-manager/unmarshal.go的setValue报错。 但是字段类型改为[]interface{}则不会错。具体我看了下,是因为将yaml直接识别为[]interface{}类型所致

------------------ 原始邮件 ------------------ 发件人: "Shawn"[email protected]; 发送时间: 2019年5月23日(星期四) 下午4:44 收件人: "go-chassis/go-archaius"[email protected]; 抄送: "王守虎"[email protected]; "Author"[email protected]; 主题: Re: [go-chassis/go-archaius] []string 字符串切片解析会出错 (#71)

请详细描述

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

mi4tin avatar May 23 '19 10:05 mi4tin

是否愿意提PR修复?

tianxiaoliang avatar Jun 13 '19 12:06 tianxiaoliang