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

MapStruct does not parse env, when mapping all data #88

Open
mbretter opened this issue Jul 18, 2024 · 0 comments
Open

MapStruct does not parse env, when mapping all data #88

mbretter opened this issue Jul 18, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@mbretter
Copy link

System (please complete the following information):

  • OS: linux
  • GO Version: 1.22.4
  • Pkg Version: 2.2.3

Describe the bug

When using MapStruct with empty key, i.e. mapping all, no environment variables are parsed

To Reproduce

	cfg := Config{}
	err = ini.MapStruct("", &cfg)
	fmt.Println(cfg.MongoDb,Uri)

	x := ini.String("mongodb.uri")
	fmt.Println(x)

	mcfg := MongoDb{}
	ini.MapStruct("mongodb", &mcfg)
	fmt.Println(mcfg)

output:

${MONGO_URI}
mongodb://xxx:[email protected]/mydb
mongodb://xxx:[email protected]/mydb

Expected behavior

Environment variables must be parsed

@inhere inhere added the enhancement New feature or request label Jul 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants