Preflight Checklist
Viper Version
1.21.0
Go Version
1.25
Config Source
Manual set
Format
INI
Repl.it link
No response
Code reproducing the issue
Expected Behavior
The readme.md file should mention that INI, HCL and Java Propeties are not part of the standard Viper anymore and require special configuration.
Basically the documentation can be copy&pasted from the migration guide:
https://github.com/spf13/viper/blob/master/UPGRADE.md#breaking-hcl-java-properties-ini-removed-from-core
It would be probably also good to mention the migration guide in the main readme. This could be also useful for upcoming breaking changes.
For example
NOTE (since 1.20) In order to reduce third-party dependencies, Viper dropped support for the following formats from the core:
You can still use these formats though by importing them from github.com/go-viper/encoding:
import (
"github.com/go-viper/encoding/hcl"
"github.com/go-viper/encoding/javaproperties"
"github.com/go-viper/encoding/ini"
)
codecRegistry := viper.NewCodecRegistry()
{
codec := hcl.Codec{}
codecRegistry.RegisterCodec("hcl", codec)
codecRegistry.RegisterCodec("tfvars", codec)
}
{
codec := &javaproperties.Codec{}
codecRegistry.RegisterCodec("properties", codec)
codecRegistry.RegisterCodec("props", codec)
codecRegistry.RegisterCodec("prop", codec)
}
codecRegistry.RegisterCodec("ini", ini.Codec{})
v := viper.NewWithOptions(
viper.WithCodecRegistry(codecRegistry),
)
Actual Behavior
Currently the documentation still lists INI and Java Propeties and claims that no more action is required. It took me quit a while to find the release notes that contains the information that INI got removed: https://github.com/spf13/viper/releases/tag/v1.20.0
From current readme:
Viper requires minimal configuration to load config files. Viper currently supports:
- JSON
- TOML
- YAML
- INI
- envfile
- Java Propeties
Steps To Reproduce
No response
Additional Information
I'm sorry if this is not a valid bug report but I wanted to get in touch first before sending over a PR.
Preflight Checklist
Viper Version
1.21.0
Go Version
1.25
Config Source
Manual set
Format
INI
Repl.it link
No response
Code reproducing the issue
Expected Behavior
The
readme.mdfile should mention that INI, HCL and Java Propeties are not part of the standard Viper anymore and require special configuration.Basically the documentation can be copy&pasted from the migration guide:
https://github.com/spf13/viper/blob/master/UPGRADE.md#breaking-hcl-java-properties-ini-removed-from-core
It would be probably also good to mention the migration guide in the main readme. This could be also useful for upcoming breaking changes.
For example
Actual Behavior
Currently the documentation still lists
INIandJava Propetiesand claims that no more action is required. It took me quit a while to find the release notes that contains the information thatINIgot removed: https://github.com/spf13/viper/releases/tag/v1.20.0From current readme:
Steps To Reproduce
No response
Additional Information
I'm sorry if this is not a valid bug report but I wanted to get in touch first before sending over a PR.