You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For context, I'm setting viper to write a file in the home directory:viper.AddConfigPath(home), and its name as viper.SetConfigName(".filename").
In #722, apparently the ability to write in files without an extension was added, and later in #827 this was only possible when config type was set. In my tests, for any valid config type, those end up being added to the file anyways. In other words, I haven't found a way create an extensionless file per the specs.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
👋 ,
I'm having trouble understanding the necessary options to configure a file name without an extension (example:
~/.bashrc
).The error I'm having is exactly coming from https://github.com/gssbzn/viper/blob/717d682741fa3aeb6d3ce1a670e60b3908e71444/viper.go#L1429-L1431.
For context, I'm setting viper to write a file in the home directory:
viper.AddConfigPath(home)
, and its name asviper.SetConfigName(".filename")
.In #722, apparently the ability to write in files without an extension was added, and later in #827 this was only possible when config type was set. In my tests, for any valid config type, those end up being added to the file anyways. In other words, I haven't found a way create an extensionless file per the specs.
Any tips on how to accomplish this?
Thank you 🙏
Beta Was this translation helpful? Give feedback.
All reactions