code: func (t *ActivatedTask) Finish(resultJSON string, expire ...time.Time) {
  	req := &dm.FinishAttemptReq{
  		Auth: t.Auth,
  		Data: dm.NewJsonResult(resultJSON),
  	}
  	switch len(expire) {
  	case 0:
  	case 1:
  		req.Data.Expiration = googlepb.NewTimestamp(expire[0])
  	default:
  		panic("may only specify 0 or 1 expire values")
  	}
  
  	_, err := t.s.FinishAttempt(t.c, req)
  	panicIf(err)
  }
docs: // Finish calls FinishAttempt with the provided JSON body and optional
  // expiration time.
  //
  // This will panic if you provide more than one expiration time (so don't do
  // that).