code: func actionPrint(path string, out io.Writer) error {
  	var endpoints Targets
  	statusFile, err := os.OpenFile(path, os.O_RDONLY, os.ModePerm)
  	if err != nil {
  		return err
  	}
  
  	err = json.NewDecoder(statusFile).Decode(&endpoints)
  	_ = statusFile.Close()
  	if err != nil {
  		return err
  	}
  
  	// TODO(lucab): move to encoder.SetIndent (golang >= 1.7)
  	status, err := json.MarshalIndent(endpoints, "", "    ")
  	if err != nil {
  		return nil
  	}
  	_, err = out.Write(status)
  	return err
  }
docs: // actionPrint prints out available endpoints by unmarshalling the Targets struct
  // from JSON at the given path. This is used by external tools to see which attaching
  // modes are available for an application (eg. `rkt attach --mode=list`)