Skip to content

Commit

Permalink
Use lowercase for nested array keys due to Viper bug
Browse files Browse the repository at this point in the history
Due to spf13/viper#1386, array keys with mixed
case are not parsed correctly. At least for the time being, mitigate
by changing some keys to all lowercase.

Signed-off-by: Andrew Richardson <andrew.richardson@kaleido.io>
  • Loading branch information
awrichar committed Jun 23, 2022
1 parent 48b87ca commit 70dea94
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions internal/coreconfig/coreconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ const (
// NamespaceName is the long description for a pre-defined namespace
NamespaceDescription = "description"
// NamespaceRemoteName is the namespace name to be sent in plugin calls
NamespaceRemoteName = "remoteName"
NamespaceRemoteName = "remotename"
// NamespacePlugins is the list of namespace plugins
NamespacePlugins = "plugins"
// NamespaceDefaultKey is the default signing key for blockchain transactions within this namespace
NamespaceDefaultKey = "defaultKey"
NamespaceDefaultKey = "defaultkey"
// NamespaceMultiparty contains the multiparty configuration for a namespace
NamespaceMultiparty = "multiparty"
// NamespaceMultipartyEnabled specifies if multi-party mode is enabled for a namespace
Expand Down
4 changes: 2 additions & 2 deletions internal/coremsgs/en_config_descriptions.go
Original file line number Diff line number Diff line change
Expand Up @@ -252,8 +252,8 @@ var (
ConfigNamespacesPredefinedName = ffc("config.namespaces.predefined[].name", "The name of the namespace (must be unique)", i18n.StringType)
ConfigNamespacesPredefinedDescription = ffc("config.namespaces.predefined[].description", "A description for the namespace", i18n.StringType)
ConfigNamespacesPredefinedPlugins = ffc("config.namespaces.predefined[].plugins", "The list of plugins for this namespace", i18n.StringType)
ConfigNamespacesPredefinedRemoteName = ffc("config.namespaces.predefined[].remoteName", "The namespace name to be sent in plugin calls, if it differs from namespace name", i18n.StringType)
ConfigNamespacesPredefinedDefaultKey = ffc("config.namespaces.predefined[].defaultKey", "A default signing key for blockchain transactions within this namespace", i18n.StringType)
ConfigNamespacesPredefinedRemoteName = ffc("config.namespaces.predefined[].remotename", "The namespace name to be sent in plugin calls, if it differs from namespace name", i18n.StringType)
ConfigNamespacesPredefinedDefaultKey = ffc("config.namespaces.predefined[].defaultkey", "A default signing key for blockchain transactions within this namespace", i18n.StringType)
ConfigNamespacesMultipartyEnabled = ffc("config.namespaces.predefined[].multiparty.enabled", "Enables multi-party mode for this namespace (defaults to true if an org name or key is configured, either here or at the root level)", i18n.BooleanType)
ConfigNamespacesMultipartyOrgName = ffc("config.namespaces.predefined[].multiparty.org.name", "A short name for the local root organization within this namespace", i18n.StringType)
ConfigNamespacesMultipartyOrgDesc = ffc("config.namespaces.predefined[].multiparty.org.description", "A description for the local root organization within this namespace", i18n.StringType)
Expand Down

0 comments on commit 70dea94

Please sign in to comment.