• workplace with laptop and ceramic vase with basket

    How to fix Viper unmarshal error for nested structs

    In times when you’re trying to unmarshal a config file using viper, check whether your config file has nested yaml structures. As shown in the example above, there are multiple layers of structs under providers (i.e. payment contains dwolla). The different with service is that its fields are set only in one level. If your…