//GetCodes returns the codes for a specific edition of a code list
426067
func (c *Client) GetCodes(codeListID string, edition string) (codes CodesResults, err error) {
	url := fmt.Sprintf("%s/code-lists/%s/editions/%s/codes", c.url, codeListID, edition)
	resp, err := c.cli.Get(context.Background(), url)
	if err != nil {
		return
	}
	defer resp.Body.Close()

	b, err := ioutil.ReadAll(resp.Body)
	if err != nil {
		return
	}

	err = json.Unmarshal(b, &codes)
	if err != nil {
		return
	}
	return codes, nil
}
125813
func getExitCode(err error) (int, error) {
	if err == nil {
		return 0, nil
	}

	ee, ok := err.(*exec.ExitError)
	if !ok {
		// If it is not an *exec.ExitError, then it must be
		// an io error, but docs do not say anything about the
		// exit code in this case.
		return 0, errors.New("expected *exec.ExitError")
	}

	ws, ok := ee.Sys().(syscall.WaitStatus)
	if !ok {
		return 0, errors.New("expected syscall.WaitStatus")
	}

	return ws.ExitStatus(), nil
}
1188977
func (ex *ExitStatus) GetExitCode() int {
	switch {
	case ex.IsKilled():
		return exitKilled
	case ex.IsTimedOut():
		return exitTimedOut
	default:
		return ex.Code
	}
}
851799
func (o *InvitationManager) GetByCode(code string) (invite *JoinOrganizationInvitation, err error) {
	qry := bson.M{
		"code": code,
	}
	err = o.collection.Find(qry).One(&invite)
	return
}
668875
func (c *MemoryStore) GetMaps(keys []string) (map[string]map[string]interface{}, error) {
	values := make(map[string]map[string]interface{}, len(keys))
	for _, v := range keys {
		value, _ := c.GetMap(v)
		if value != nil {
			values[v] = value
		}
	}

	return values, nil
}
131515
func (obj *Global) GetSupportedCodePages(ctx context.Context) ([]*CodePage, error) {
	result := &struct {
		CodePages []*CodePage	`json:"qCodePages"`
	} {}
	err := obj.rpc(ctx, "GetSupportedCodePages", result)
	return result.CodePages, err 
}
301296
func (o *UlimitOpt) GetList() []*units.Ulimit {
	var ulimits []*units.Ulimit
	for _, v := range *o.values {
		ulimits = append(ulimits, v)
	}

	return ulimits
}
337688
func (cpcode *CpCode) GetCpCode() error {
	req, err := client.NewRequest(
		Config,
		"GET",
		fmt.Sprintf(
			"/papi/v1/cpcodes/%s?contractId=%s&groupId=%s",
			cpcode.CpcodeID,
			cpcode.parent.Contract.ContractID,
			cpcode.parent.Group.GroupID,
		),
		nil,
	)
	if err != nil {
		return err
	}

	res, err := client.Do(Config, req)

	if client.IsError(res) {
		return client.NewAPIError(res)
	}

	newCpcodes := NewCpCodes(nil, nil)
	if err = client.BodyJSON(res, newCpcodes); err != nil {
		return err
	}
	if len(newCpcodes.CpCodes.Items) == 0 {
		return fmt.Errorf("CP Code \"%s\" not found", cpcode.CpcodeID)
	}

	cpcode.CpcodeID = newCpcodes.CpCodes.Items[0].CpcodeID
	cpcode.CpcodeName = newCpcodes.CpCodes.Items[0].CpcodeName
	cpcode.ProductID = newCpcodes.CpCodes.Items[0].ProductID
	cpcode.ProductIDs = newCpcodes.CpCodes.Items[0].ProductIDs
	cpcode.CreatedDate = newCpcodes.CpCodes.Items[0].CreatedDate

	cpcode.parent.AddCpCode(cpcode)

	return nil
}
924690
func (v *ListTypeVersioningV1) GetMyints() (o []int32) {
	if v != nil && v.Myints != nil {
		return v.Myints
	}

	return
}
155004
func (v *Xception) GetErrorCode() (o int32) {
	if v != nil && v.ErrorCode != nil {
		return *v.ErrorCode
	}

	return
}
866690
func (p *PullRequest) GetAdditions() int {
	if p == nil || p.Additions == nil {
		return 0
	}
	return *p.Additions
}
239715
func GetRecoveryCodesByUserID(userID int64) ([]*TwoFactorRecoveryCode, error) {
	recoveryCodes := make([]*TwoFactorRecoveryCode, 0, 10)
	return recoveryCodes, x.Where("user_id = ?", userID).Find(&recoveryCodes)
}
859965
func WithCodes(f grpc_logging.ErrorToCode) Option {
	return func(o *options) {
		o.codeFunc = f
	}
}
913642
func (c *Client) GetCodeListEditions(codeListID string) (editions EditionsListResults, err error) {
	url := fmt.Sprintf("%s/code-lists/%s/editions", c.url, codeListID)
	resp, err := c.cli.Get(context.Background(), url)
	if err != nil {
		return
	}
	defer resp.Body.Close()

	b, err := ioutil.ReadAll(resp.Body)
	if err != nil {
		return
	}

	err = json.Unmarshal(b, &editions)
	if err != nil {
		return
	}
	return editions, nil
}
732967
func errorCode(err error) codes.Code {
	switch errors.Unwrap(err) {
	case context.DeadlineExceeded:
		return codes.DeadlineExceeded

	case context.Canceled:
		return codes.Canceled

	default:
		return grpc.Code(err)
	}
}
494738
func (c *client) GetEntries(key string) ([]string, error) {
	resp, err := c.kv.Get(c.ctx, key, clientv3.WithPrefix())
	if err != nil {
		return nil, err
	}

	entries := make([]string, len(resp.Kvs))
	for i, kv := range resp.Kvs {
		entries[i] = string(kv.Value)
	}

	return entries, nil
}
230787
func (txc txStateChanges) getLists() (mined []common.Hash, rollback []common.Hash) {
	for hash, val := range txc {
		if val {
			mined = append(mined, hash)
		} else {
			rollback = append(rollback, hash)
		}
	}
	return
}