go-chassis/go-archaius

ssl不支持有bool类型的参数

aseTo2016 opened this issue · 3 comments

Describe the bug
A clear and concise description of what the bug is.

Version of go archaius
v1.3.2
To Reproduce
Steps to reproduce the behavior:
ssl:
rest.Provider.verifyPeer: false
rest.Provider.cipherPlugin: go-lib-aes
rest.Provider.cipherSuits: TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
rest.Provider.protocol: TLSv1.2
rest.Provider.caFile: xxx
rest.Provider.certFile: xxx
rest.Provider.keyFile: xxx
rest.Provider.certPwdFile: xxx

存在bool类型的,就会出现读取不到这些配置情况,导致证书加载部分异常

代码异常部分
unmarshal.go里面的populateMap函数

		// maybe next map type,此时mapValueType 为string,而 setVal.Type() 为bool,导致函数退出,没有获取完需要的值
		if mapValueType != setVal.Type() {
			return rValue, nil

		}

Logs

map就是map[string]string 类型,go-archaius库不负责对这个map进行转换,类型转换在go-chassis中,能否附加上详细日志信息。(以及go-chassis版本号)

结构体内如果要解析map时,如果value实际存储类型类型和map内指定的value类型不同,那么就无法触发值转换了。

要思考下解决方案

请更新到v1.5.4