code: func (c *LabelController) Update(ctx *app.UpdateLabelContext) error {
  	_, err := login.ContextIdentity(ctx)
  	if err != nil {
  		return jsonapi.JSONErrorResponse(ctx, goa.ErrUnauthorized(err.Error()))
  	}
  	if ctx.Payload.Data.Attributes.Version == nil {
  		return jsonapi.JSONErrorResponse(ctx, errors.NewBadParameterError("data.attributes.version", nil).Expected("not nil"))
  	}
  	var lbl *label.Label
  	err = application.Transactional(c.db, func(appl application.Application) error {
  		var err error
  		lbl, err = appl.Labels().Load(ctx.Context, ctx.LabelID)
  		if err != nil {
  			return err
  		}
  		if lbl.Version != *ctx.Payload.Data.Attributes.Version {
  			return errors.NewVersionConflictError("version conflict")
  		}
  		if ctx.Payload.Data.Attributes.Name != nil {
  			lbl.Name = strings.TrimSpace(*ctx.Payload.Data.Attributes.Name)
  		}
  		if ctx.Payload.Data.Attributes.TextColor != nil {
  			lbl.TextColor = *ctx.Payload.Data.Attributes.TextColor
  		}
  		if ctx.Payload.Data.Attributes.BackgroundColor != nil {
  			lbl.BackgroundColor = *ctx.Payload.Data.Attributes.BackgroundColor
  		}
  		if ctx.Payload.Data.Attributes.BorderColor != nil {
  			lbl.BorderColor = *ctx.Payload.Data.Attributes.BorderColor
  		}
  		lbl, err = appl.Labels().Save(ctx, *lbl)
  		return err
  	})
  	if err != nil {
  		return jsonapi.JSONErrorResponse(ctx, err)
  	}
  	result := &app.LabelSingle{
  		Data: ConvertLabel(ctx.Request, *lbl),
  	}
  	ctx.ResponseData.Header().Set("Location", rest.AbsoluteURL(ctx.Request, app.LabelHref(ctx.SpaceID, result.Data.ID)))
  	return ctx.OK(result)
  }
docs: // Update runs the update action.