code: func OpenWithOptions(filename string, options *intrinsics.ProcessorOptions) (*cloudformation.Template, error) {
  
  	data, err := ioutil.ReadFile(filename)
  	if err != nil {
  		return nil, err
  	}
  
  	if strings.HasSuffix(filename, ".json") {
  		// This is definitely JSON
  		return ParseJSONWithOptions(data, options)
  	}
  
  	return ParseYAMLWithOptions(data, options)
  }
docs: // OpenWithOptions opens and parse a AWS CloudFormation template from file.
  // Works with either JSON or YAML formatted templates.
  // Parsing can be tweaked via the specified options.