code: func subEnvVars(s string) string {
  	updatedConfig := envRegex.ReplaceAllStringFunc(s, func(s string) string {
  		// Trim off the '${' and '}'
  		if len(s) <= 3 {
  			// This should never happen..
  			return ""
  		}
  		varName := s[2 : len(s)-1]
  
  		// Lookup the variable in the environment. We play by
  		// bash rules.. if its undefined we'll treat it as an
  		// empty string instead of raising an error.
  		return os.Getenv(varName)
  	})
  
  	return updatedConfig
  }
docs: // subEnvVars will look for any environment variables in the passed in string
  // with the syntax of ${VAR_NAME} and replace that string with ENV[VAR_NAME]