code: func Inspect(out io.Writer, references []string, tmplStr string, getRef GetRefFunc) error {
  	inspector, err := NewTemplateInspectorFromString(out, tmplStr)
  	if err != nil {
  		return cli.StatusError{StatusCode: 64, Status: err.Error()}
  	}
  
  	var inspectErrs []string
  	for _, ref := range references {
  		element, raw, err := getRef(ref)
  		if err != nil {
  			inspectErrs = append(inspectErrs, err.Error())
  			continue
  		}
  
  		if err := inspector.Inspect(element, raw); err != nil {
  			inspectErrs = append(inspectErrs, err.Error())
  		}
  	}
  
  	if err := inspector.Flush(); err != nil {
  		logrus.Errorf("%s\n", err)
  	}
  
  	if len(inspectErrs) != 0 {
  		return cli.StatusError{
  			StatusCode: 1,
  			Status:     strings.Join(inspectErrs, "\n"),
  		}
  	}
  	return nil
  }
docs: // Inspect fetches objects by reference using GetRefFunc and writes the json
  // representation to the output writer.