// MoveBefore moves element e to its new position before mark.
// If e == mark, the list is not modified.
494611
func (l *List) MoveBefore(e, mark *Element) {
	if e == mark || mark.list != l {
		return
	}
	l.insert(l.remove(e), mark.prev)
}
1128053
func (l *PacketList) InsertBefore(v Packet, mark *PacketElement) *PacketElement {
	if mark.list != l {
		return nil
	}
	// see comment in List.Remove about initialization of l
	return l.insertValue(v, mark.prev)
}
1304331
func (l *list) InsertBefore(v interface{}, mark *element) *element {
	if mark.list != l {
		return nil
	}
	// see comment in List.Remove about initialization of l
	return l.insertValue(v, mark.prev)
}
2854
func (s *GetDifferencesInput) SetBeforePath(v string) *GetDifferencesInput {
	s.BeforePath = &v
	return s
}
909907
func (all *assetLruList) MoveAfter(alle, mark *assetLruListElement) {
	if alle.list != all || alle == mark || mark.list != all {
		return
	}
	all.insert(all.remove(alle), mark)
}
641041
func (s *ListBackupJobsInput) SetByCreatedBefore(v time.Time) *ListBackupJobsInput {
	s.ByCreatedBefore = &v
	return s
}
534892
func (t *Module) SetBefore(action cli.ActionFunc) *Module {
	t.Before = action
	return t
}
847523
func (s *ListDatasetContentsInput) SetScheduledBefore(v time.Time) *ListDatasetContentsInput {
	s.ScheduledBefore = &v
	return s
}
1304250
func (s *Storage) ClearBefore(ctx context.Context, convID chat1.ConversationID, uid gregor1.UID,
	upto chat1.MessageID) (err Error) {
	defer s.Trace(ctx, func() error { return err }, fmt.Sprintf("ClearBefore: convID: %s, uid: %s, msgID: %d", convID, uid, upto))()
	lock := locks.StorageLockTab.AcquireOnName(ctx, s.G(), convID.String())
	defer lock.Release(ctx)

	// Abort, we don't want to overflow uint (chat1.MessageID)
	if upto == 0 {
		return nil
	}
	return s.clearUpthrough(ctx, convID, uid, upto-1)
}
433748
func (l *PacketIntervalList) MoveBefore(e, mark *PacketIntervalElement) {
	if e.list != l || e == mark || mark.list != l {
		return
	}
	l.insert(l.remove(e), mark.prev)
}
1125882
func (repo *Repository) commitsBefore(l *list.List, parent *list.Element, id sha1, current, limit int) error {
	// Reach the limit
	if limit > 0 && current > limit {
		return nil
	}

	commit, err := repo.getCommit(id)
	if err != nil {
		return fmt.Errorf("getCommit: %v", err)
	}

	var e *list.Element
	if parent == nil {
		e = l.PushBack(commit)
	} else {
		var in = parent
		for {
			if in == nil {
				break
			} else if in.Value.(*Commit).ID.Equal(commit.ID) {
				return nil
			} else if in.Next() == nil {
				break
			}

			if in.Value.(*Commit).Committer.When.Equal(commit.Committer.When) {
				break
			}

			if in.Value.(*Commit).Committer.When.After(commit.Committer.When) &&
				in.Next().Value.(*Commit).Committer.When.Before(commit.Committer.When) {
				break
			}

			in = in.Next()
		}

		e = l.InsertAfter(commit, in)
	}

	pr := parent
	if commit.ParentCount() > 1 {
		pr = e
	}

	for i := 0; i < commit.ParentCount(); i++ {
		id, err := commit.ParentID(i)
		if err != nil {
			return err
		}
		err = repo.commitsBefore(l, pr, id, current+1, limit)
		if err != nil {
			return err
		}
	}

	return nil
}
758665
func (step *StepModel) AuditBeforeShare() error {
	if step.Title == nil || *step.Title == "" {
		return errors.New("Invalid step: missing or empty required 'title' property")
	}
	if step.Summary == nil || *step.Summary == "" {
		return errors.New("Invalid step: missing or empty required 'summary' property")
	}
	if step.Website == nil || *step.Website == "" {
		return errors.New("Invalid step: missing or empty required 'website' property")
	}

	if step.Timeout != nil && *step.Timeout < 0 {
		return errors.New("Invalid step: timeout less then 0")
	}

	return step.ValidateInputAndOutputEnvs(true)
}
1332139
func (a *ActDepend) OverrideBefore(index int, fx func(b interface{}, a ActionInterface)) ActionInterface {
	ind, ok := a.correctIndex(index)

	if !ok {
		return a
	}

	ax := a.waiters[ind]

	var dx ActionInterface

	if ind < 1 {
		dx = a.root
	} else {
		dx = a.waiters[ind-1]
	}

	if _, ok := a.states[ind]; ok {
		a.states[ind] = true
	}

	return dx.UseThen(fx, ax)
}
1321145
func (s *DescribeCasesInput) SetBeforeTime(v string) *DescribeCasesInput {
	s.BeforeTime = &v
	return s
}
734151
func HandlerBefore(before ...HandlerRequestFunc) HandlerOption {
	return func(h *Handler) { h.before = append(h.before, before...) }
}
761394
func (l *list) MoveToFront(e *element) {
	if e.list != l || l.root.next == e {
		return
	}
	// see comment in List.Remove about initialization of l
	l.insert(l.remove(e), &l.root)
}
354226
func (l *PacketIntervalList) InsertBefore(v PacketInterval, mark *PacketIntervalElement) *PacketIntervalElement {
	if mark.list != l {
		return nil
	}
	// see comment in List.Remove about initialization of l
	return l.insertValue(v, mark.prev)
}