func loadRegistryConf(sys *types.SystemContext) (*tomlConfig, error) {
	config := &tomlConfig{}

	configBytes, err := readConf(sys)
	if err != nil {
		return nil, err
	}

	err = toml.Unmarshal(configBytes, &config)
	normalizeRegistries(&config.Registries.Search)
	normalizeRegistries(&config.Registries.Insecure)
	normalizeRegistries(&config.Registries.Block)
	return config, err
}
func loadRegistryConf(sys *types.SystemContext) (*tomlConfig, error) {
	config := &tomlConfig{}

	configBytes, err := readConf(sys)
	if err != nil {
		return nil, err
	}

	err = toml.Unmarshal(configBytes, &config)
	normalizeRegistries(&config.Registries.Search)
	normalizeRegistries(&config.Registries.Insecure)
	normalizeRegistries(&config.Registries.Block)
	return config, err
}
// Loads the registry configuration file from the filesystem and
// then unmarshals it.  Returns the unmarshalled object.