code: func Cascade(logWriter io.Writer, shortCircuit bool, providers ...ConfigProvider) *configSource {
  	var fromStrings []string
  	skip := true
  	for _, provider := range providers {
  		if !provider.Skip() {
  			skip = false
  			fromStrings = append(fromStrings, provider.From())
  		}
  	}
  	fromPrefix := "each of"
  	if shortCircuit {
  		fromPrefix = "first of"
  
  	}
  	return &configSource{
  		skip: skip,
  		from: fmt.Sprintf("%s: %s", fromPrefix, strings.Join(fromStrings, " then ")),
  		apply: func(baseConfig interface{}) error {
  			if baseConfig == nil {
  				return fmt.Errorf("baseConfig passed to Cascade(...).Get() must not be nil")
  			}
  			for _, provider := range providers {
  				if !provider.Skip() {
  					writeLog(logWriter, fmt.Sprintf("Sourcing config from %s", provider.From()))
  					err := provider.Apply(baseConfig)
  					if err != nil {
  						return err
  					}
  					if shortCircuit {
  						return nil
  					}
  				}
  			}
  			return nil
  		},
  	}
  }
docs: // Builds a ConfigProvider by iterating over a cascade of ConfigProvider sources. Can be used
  // in two distinct modes: with shortCircuit true the first successful ConfigProvider source
  // is returned. With shortCircuit false sources appearing later are used to possibly override
  // those appearing earlier