// ReadTopicSettings to read for each file and pass the topic-settings
ReadTopicSettings to read for each file and pass the topic-settings
// ReadTopicSettings to read for each file and pass the topic - settings
func ReadTopicSettings(client *api.Client, cmd *cobra.Command, filePath string) error {
	files, err := utils.FindFiles(filePath)
	if err != nil {
		return err
	}
	for _, file := range files {
		var settings api.TopicSettingsRequest
		var fileName = file.Name()
		if err := bite.LoadFile(cmd, fmt.Sprintf("%s/%s", filePath, file.Name()), &settings); err != nil {
			return errors.Wrapf(err, utils.RED("Could not load file [%s]"), fileName)
		}
		if err := client.UpdateTopicSettings(settings); err != nil {
			return errors.Wrapf(err, utils.RED("Could not update Topic Settings [%s]"), fileName)
		}
		fmt.Printf(utils.GREEN("✓ Imported Topic Settings from [%s]\n"), fileName)
	}
	return nil
}
func ReadTopicSettings ( client * api . Client , cmd * cobra . Command , filePath string ) error { files , err := utils . FindFiles ( filePath ) if err != nil { return err } for _ , file := range files { var settings api . TopicSettingsRequest var fileName = file . Name ( ) if err := bite . LoadFile ( cmd , fmt . Sprintf ( " " , filePath , file . Name ( ) ) , & settings ) ; err != nil { return errors . Wrapf ( err , utils . RED ( " " ) , fileName ) } if err := client . UpdateTopicSettings ( settings ) ; err != nil { return errors . Wrapf ( err , utils . RED ( " " ) , fileName ) } fmt . Printf ( utils . GREEN ( " ") , f leName) } return nil }
ReadTopicSettings to read for each file and pass the topic-settings
ReadTopicSettings to read for each file and pass the topic - settings