code: func replaceEnvReferences(s, refStart, refEnd string) string {
  	index := strings.Index(s, refStart)
  	for index != -1 {
  		endIndex := strings.Index(s, refEnd)
  		if endIndex != -1 {
  			ref := s[index : endIndex+len(refEnd)]
  			s = strings.Replace(s, ref, os.Getenv(ref[len(refStart):len(ref)-len(refEnd)]), -1)
  		} else {
  			return s
  		}
  		index = strings.Index(s, refStart)
  	}
  	return s
  }
docs: // replaceEnvReferences performs the actual replacement of env variables
  // in s, given the placeholder start and placeholder end strings.