gotosocial/internal/config
kim 91c0ed863a
[bugfix] #621: add weak type handing to mapstructure decode (#625)
* Drone sig (#623)

* accept weakly typed input on mapstructure decode i.e. .UnmarshalMap()

Signed-off-by: kim <grufwub@gmail.com>

* add envparsing script to test for panics during environment variable parsing

Signed-off-by: kim <grufwub@gmail.com>

* add envparsing.sh script to drone commands

Signed-off-by: kim <grufwub@gmail.com>

* update drone signature

Co-authored-by: kim <grufwub@gmail.com>

* compare expected with output

* update expected output of envparsing

* update expected output to correct value

* use viper's unmarshal function instead
There were problems with marshalling
string slices from viper into the st.config
struct with the other function. Now, we
can use viper's unmarshal function and pass
in the custom decoder config that we need
as a hook. This ensures that we marshal
string slices from viper into our config
struct correctly.

Co-authored-by: tobi <31960611+tsmethurst@users.noreply.github.com>
Co-authored-by: tsmethurst <tobi.smethurst@protonmail.com>
2022-06-08 20:28:28 +02:00
..
gen [chore] Global server configuration overhaul (#575) 2022-05-30 14:41:24 +02:00
config.go [bugfix] #621: add weak type handing to mapstructure decode (#625) 2022-06-08 20:28:28 +02:00
defaults.go [feature] Start adding advanced configuration options, starting with samesite (#628) 2022-06-03 15:40:38 +02:00
flags.go [feature] Start adding advanced configuration options, starting with samesite (#628) 2022-06-03 15:40:38 +02:00
global.go [chore] Global server configuration overhaul (#575) 2022-05-30 14:41:24 +02:00
helpers.gen.go [feature] Start adding advanced configuration options, starting with samesite (#628) 2022-06-03 15:40:38 +02:00
state.go [bugfix] #621: add weak type handing to mapstructure decode (#625) 2022-06-08 20:28:28 +02:00
validate_test.go [chore] Global server configuration overhaul (#575) 2022-05-30 14:41:24 +02:00
validate.go [chore] Global server configuration overhaul (#575) 2022-05-30 14:41:24 +02:00