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

configmap can not be UnmarshalConfig #149

Open
WintonChan opened this issue Oct 19, 2021 · 2 comments
Open

configmap can not be UnmarshalConfig #149

WintonChan opened this issue Oct 19, 2021 · 2 comments
Assignees
Labels

Comments

@WintonChan
Copy link

WintonChan commented Oct 19, 2021

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
#``

@tianxiaoliang
Copy link
Member

tianxiaoliang commented Dec 20, 2021

@five111 是否可以看下这个场景?感谢。本该修复的不解析问题依然存在#146

@five111
Copy link
Contributor

five111 commented Dec 21, 2021

I'm not sure about the specific usage scenarios, can you provide a UT that can reproduce the problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants