code: func InspectFormatWrite(ctx formatter.Context, refs []string, getRef inspect.GetRefFunc) error {
  	if ctx.Format != secretInspectPrettyTemplate {
  		return inspect.Inspect(ctx.Output, refs, string(ctx.Format), getRef)
  	}
  	render := func(format func(subContext formatter.SubContext) error) error {
  		for _, ref := range refs {
  			secretI, _, err := getRef(ref)
  			if err != nil {
  				return err
  			}
  			secret, ok := secretI.(swarm.Secret)
  			if !ok {
  				return fmt.Errorf("got wrong object to inspect :%v", ok)
  			}
  			if err := format(&secretInspectContext{Secret: secret}); err != nil {
  				return err
  			}
  		}
  		return nil
  	}
  	return ctx.Write(&secretInspectContext{}, render)
  }
docs: // InspectFormatWrite renders the context for a list of secrets