code: func (s *Service) UpdateMacro(ctx context.Context, id platform.ID, update *platform.MacroUpdate) (*platform.Macro, error) {
  	op := OpPrefix + platform.OpUpdateMacro
  	macro, err := s.FindMacroByID(ctx, id)
  	if err != nil {
  		return nil, &platform.Error{
  			Op:   op,
  			Code: platform.ENotFound,
  			Msg:  "macro not found",
  			Err:  err,
  		}
  	}
  
  	if err := update.Apply(macro); err != nil {
  		return nil, &platform.Error{
  			Op:  op,
  			Err: err,
  		}
  	}
  
  	if err := s.ReplaceMacro(ctx, macro); err != nil {
  		return nil, &platform.Error{
  			Op:  op,
  			Err: err,
  		}
  	}
  
  	return macro, nil
  }
docs: // UpdateMacro implements the platform.MacroService interface