// Edit calls f(v, key, ch, mod)
176516
func (f EditorFunc) Edit(v *View, key Key, ch rune, mod Modifier) {
	f(v, key, ch, mod)
}
561636
func (r replacer) Set(key, value string) {
	r.replacements["{"+key+"}"] = value
}
550011
func (a *Account) EditPassword(oldPassword, newPassword string) error {
	edits := editPasswordReq{
		OldPassword: oldPassword,
		Password:    newPassword,
	}

	err := a.patch(a.auth, "/api/v2/users/me", edits, nil)
	if err != nil {
		return fmt.Errorf("Could change not password: %s", err)
	}
	return nil
}
130985
func (r *Ring) mod(p int) int {
	return p % len(r.buff)
}
275581
func (e *Edit) String() string {
	return fmt.Sprintf("%s: %v, %v, %v", e.command, e.args, e.bypassUndo, e.composite)
}
876342
func (f *Values) Add(key, val string) {
	f.values = append(f.values, formValue{key, val})
}
967535
func (c *Client) Replace(key, val string, flags, exp uint32, ocas uint64) (cas uint64, err error) {
	// Variants: Replace [Q]
	return c.setGeneric(opReplace, key, val, ocas, flags, exp)
}
1023487
func (spec MutateInSpec) Replace(path string, val interface{}, opts *MutateInSpecReplaceOptions) MutateInOp {
	if opts == nil {
		opts = &MutateInSpecReplaceOptions{}
	}
	var flags SubdocFlag
	if opts.IsXattr {
		flags |= SubdocFlagXattr
	}

	encoder := opts.Encoder
	if opts.Encoder == nil {
		encoder = JSONEncode
	}

	marshaled, _, err := encoder(val)
	if err != nil {
		return MutateInOp{err: err}
	}

	op := gocbcore.SubDocOp{
		Op:    gocbcore.SubDocOpReplace,
		Path:  path,
		Flags: gocbcore.SubdocFlag(flags),
		Value: marshaled,
	}

	return MutateInOp{op: op}
}
214035
func editRecord(c *godo.Client, zoneName string, recordID int, editRequest *godo.DomainRecordEditRequest) error {
	_, _, err := c.Domains.EditRecord(context.TODO(), zoneName, recordID, editRequest)
	if err != nil {
		return fmt.Errorf("error editing record: %v", err)
	}

	return nil
}
1369279
func (s *KVStore) Update(ctx context.Context, fn func(kv.Tx) error) error {
	s.mu.Lock()
	defer s.mu.Unlock()
	if s.buckets == nil {
		s.buckets = map[string]*Bucket{}
	}

	return fn(&Tx{
		kv:       s,
		writable: true,
		ctx:      ctx,
	})
}
937763
func (uvm *UtilityVM) Modify(hcsModificationDocument interface{}) (err error) {
	op := "uvm::Modify"
	log := logrus.WithFields(logrus.Fields{
		logfields.UVMID: uvm.id,
	})
	log.Debug(op + " - Begin Operation")
	defer func() {
		if err != nil {
			log.Data[logrus.ErrorKey] = err
			log.Error(op + " - End Operation - Error")
		} else {
			log.Debug(op + " - End Operation - Success")
		}
	}()

	return uvm.hcsSystem.Modify(hcsModificationDocument)
}
1219977
func (mr *MockGerritClientMockRecorder) ChangeEditPublish(ctx, in interface{}, opts ...interface{}) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	varargs := append([]interface{}{ctx, in}, opts...)
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ChangeEditPublish", reflect.TypeOf((*MockGerritClient)(nil).ChangeEditPublish), varargs...)
}
989746
func (t *transformer) transform(key string, fn func(string) string) bool {
	t.mut.Lock()
	defer t.mut.Unlock()
	val, found := t.cache[key]
	if !found {
		return false
	}
	str, ok := val.(string)
	if !ok {
		return false
	}
	newStr := fn(str)
	t.cache[key] = newStr
	return true
}
586922
func (model *Model) EditsMulti(term string, depth int) []string {
	edits := Edits1(term)
	for {
		depth--
		if depth <= 0 {
			break
		}
		for _, edit := range edits {
			edits2 := Edits1(edit)
			for _, edit2 := range edits2 {
				edits = append(edits, edit2)
			}
		}
	}
	return edits
}
208602
func (w *wrapper) Replace(cfg Configuration) (Waiter, error) {
	w.mut.Lock()
	defer w.mut.Unlock()
	return w.replaceLocked(cfg.Copy())
}
973826
func (v *View) Replace(edit *Edit, r text.Region, value string) {
	edit.composite.AddExec(text.NewReplaceAction(v.buffer, r, value))
}
1354703
func Edits1(word string) []string {

	splits := []Pair{}
	for i := 0; i <= len(word); i++ {
		splits = append(splits, Pair{word[:i], word[i:]})
	}

	total_set := []string{}
	for _, elem := range splits {

		//deletion
		if len(elem.str2) > 0 {
			total_set = append(total_set, elem.str1+elem.str2[1:])
		} else {
			total_set = append(total_set, elem.str1)
		}

	}

	// Special case ending in "ies" or "ys"
	if strings.HasSuffix(word, "ies") {
		total_set = append(total_set, word[:len(word)-3]+"ys")
	}
	if strings.HasSuffix(word, "ys") {
		total_set = append(total_set, word[:len(word)-2]+"ies")
	}

	return total_set
}