Parsing an array of strings #1098
-
How do i parse the following yaml with viper ?
I am parsing as follows
I would like to parse that whiteList IPs for looping and also the clothing key with the struct way ? Kevin |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 5 replies
-
Can you try replicating your config using the following repl: https://repl.it/@sagikazarmark/Viper-example Then try to reproduce your issues Update: Viper supports string slices. The above example is a bit complicated to demonstrate the exact issue. Please see the example I linked (it contains a string slice example). Please try to use that example to reproduce your issue. |
Beta Was this translation helpful? Give feedback.
Can you try replicating your config using the following repl: https://repl.it/@sagikazarmark/Viper-example
Then try to reproduce your issues
Update: Viper supports string slices. The above example is a bit complicated to demonstrate the exact issue. Please see the example I linked (it contains a string slice example). Please try to use that example to reproduce your issue.