code: func (c *Client) UpdateTarget(ctx context.Context, update *platform.ScraperTarget) (target *platform.ScraperTarget, err error) {
  	op := getOp(platform.OpUpdateTarget)
  	var pe *platform.Error
  	if !update.ID.Valid() {
  		return nil, &platform.Error{
  			Code: platform.EInvalid,
  			Op:   op,
  			Msg:  "id is invalid",
  		}
  	}
  	err = c.db.Update(func(tx *bolt.Tx) error {
  		target, pe = c.findTargetByID(ctx, tx, update.ID)
  		if pe != nil {
  			return pe
  		}
  		target = update
  		return c.putTarget(ctx, tx, target)
  	})
  
  	if err != nil {
  		return nil, &platform.Error{
  			Op:  op,
  			Err: err,
  		}
  	}
  
  	return target, nil
  }
docs: // UpdateTarget updates a scraper target.