Parsing an array of strings #1098
Answered
by
sagikazarmark
linuxbsdfreak
asked this question in
Q&A
-
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.
Answered by
sagikazarmark
Mar 22, 2021
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.
5 replies
Answer selected by
sagikazarmark
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.