go-archaius
go-archaius copied to clipboard
configmap can not be UnmarshalConfig
Describe the bug A clear and concise description of what the bug is. use archaius to parse configmap
apiVersion: v1
kind: ConfigMap
metadata:
name: roboartisan-robooperationmanagement-config
labels:
name: roboartisan-robooperationmanagement-config
data:
database.ip: 0.0.0.0
database.port: 5432
database.user_name: root
the struct database
type Database struct {
UserName string `json:"user_name"`
Password string `json:"password"`
IP string `json:"ip"`
Port int `json:"port"`
DBName string `json:"db_name"`
SslMode string `json:"ssl_mode"`
MaxIdle int `json:"max_idle"`
MaxConn int `json:"max_conn"`
}
After archaius.UnmarshalConfig ,string type data can be parse, but int type data fail to parse
Version of go chassis
v1.5.4
To Reproduce
Steps to reproduce the behavior:
Logs #``
@five111 是否可以看下这个场景?感谢。本该修复的不解析问题依然存在https://github.com/go-chassis/go-archaius/pull/146
I'm not sure about the specific usage scenarios, can you provide a UT that can reproduce the problem