// ephemeral flag here is user requested.
427889
func (this *zookeeper) track_ephemeral(zn *Node, ephemeral bool) {
	if ephemeral || (zn.Stats != nil && zn.Stats.EphemeralOwner > 0) {
		this.ephemeral_add <- zn
	}
}
1142718
func EpollWait(epfd int, events []unix.EpollEvent, msec int) (int, error) {
	return unix.EpollWait(epfd, events, msec)
}
366808
func (api userApi) GetWeeklyTrackChart(args map[string]interface{}) (result UserGetWeeklyTrackChart, err error) {
	defer func() { appendCaller(err, "lastfm.User.GetWeeklyTrackChart") }()
	err = callGet("user.getweeklytrackchart", api.params, args, &result, P{
		"plain": []string{"user", "from", "to"},
	})
	return
}
740337
func (*GoFlags) BoolVar(b *bool, o string, d bool, c string) {
	flag.BoolVar(b, o, d, c)
}
974228
func (i *inotify) epollclose() (err error) {
	if i.epfd != invalidDescriptor {
		if err = unix.Close(i.epfd); err == nil {
			i.epfd = invalidDescriptor
		}
	}
	for n, fd := range i.pipefd {
		if fd != invalidDescriptor {
			switch e := unix.Close(fd); {
			case e != nil && err == nil:
				err = e
			case e == nil:
				i.pipefd[n] = invalidDescriptor
			}
		}
	}
	return
}
1363009
func (api *Client) PostEphemeralContext(ctx context.Context, channelID, userID string, options ...MsgOption) (timestamp string, err error) {
	_, timestamp, _, err = api.SendMessageContext(ctx, channelID, MsgOptionPostEphemeral(userID), MsgOptionCompose(options...))
	return timestamp, err
}
1063512
func (ListSnapshots) Each(resp interface{}, callback IterateItemFunc) {
	items, ok := resp.(*ListSnapshotsResponse)
	if !ok {
		callback(nil, fmt.Errorf("wrong type, ListSnapshotsResponse was expected, got %T", resp))
		return
	}

	for i := range items.Snapshot {
		if !callback(&items.Snapshot[i], nil) {
			break
		}
	}
}
389442
func (e *EphemeralKey) UnmarshalJSON(data []byte) error {
	type ephemeralKey EphemeralKey
	var ee ephemeralKey
	err := json.Unmarshal(data, &ee)
	if err == nil {
		*e = EphemeralKey(ee)
	}

	e.RawJSON = data

	return nil
}
180069
func flagLogLevel(fs *flag.FlagSet, addr *logLevelArg, def string) {
	if def != "" {
		addr.Set(def)
	}
	fs.VarP(
		addr,
		"log-level",
		"l",
		`Sets the log level`)
}
516548
func (c *Command) persistentFlag(name string) (flag *flag.Flag) {
	if c.HasPersistentFlags() {
		flag = c.PersistentFlags().Lookup(name)
	}

	if flag == nil {
		c.updateParentsPflags()
		flag = c.parentsPflags.Lookup(name)
	}
	return
}
1327446
func (registry *Registry) RegisterPeriodicThresholdFunc(name string, period time.Duration, threshold int, check CheckFunc) {
	registry.Register(name, PeriodicThresholdChecker(check, period, threshold))
}
1023991
func UserProximity(listener func(*vecty.Event)) *vecty.EventListener {
	return &vecty.EventListener{Name: "userproximity", Listener: listener}
}
756736
func (q *SimpleQueryStringQuery) Flags(flags string) *SimpleQueryStringQuery {
	q.flags = flags
	return q
}
38191
func (c *Command) PersistentFlags() *flag.FlagSet {
	if c.pflags == nil {
		c.pflags = flag.NewFlagSet(c.Name(), flag.ContinueOnError)
		if c.flagErrorBuf == nil {
			c.flagErrorBuf = new(bytes.Buffer)
		}
		c.pflags.SetOutput(c.flagErrorBuf)
	}
	return c.pflags
}
476701
func (c *Callbacks) OnCMsgClearEntityDecalsEvent(fn func(*dota.CMsgClearEntityDecalsEvent) error) {
	c.onCMsgClearEntityDecalsEvent = append(c.onCMsgClearEntityDecalsEvent, fn)
}
808700
func (cl *CommandLine) RemoveAllFlag(flag string) (found bool) {
	return cl.RemoveFlagMatch(func(f CommandLineFlag) bool { return f.Flag == flag })
}
909421
func (s *HybridConversationSource) notifyEphemeralPurge(ctx context.Context, uid gregor1.UID, convID chat1.ConversationID, explodedMsgs []chat1.MessageUnboxed) {
	s.Debug(ctx, "notifyEphemeralPurge: exploded: %d", len(explodedMsgs))
	if len(explodedMsgs) > 0 {
		// Blast out an EphemeralPurgeNotifInfo since it's time sensitive for the UI
		// to update.
		purgedMsgs := []chat1.UIMessage{}
		for _, msg := range explodedMsgs {
			purgedMsgs = append(purgedMsgs, utils.PresentMessageUnboxed(ctx, s.G(), msg, uid, convID))
		}
		act := chat1.NewChatActivityWithEphemeralPurge(chat1.EphemeralPurgeNotifInfo{
			ConvID: convID,
			Msgs:   purgedMsgs,
		})
		s.G().ActivityNotifier.Activity(ctx, uid, chat1.TopicType_CHAT, &act, chat1.ChatActivitySource_LOCAL)

		// Send an additional notification to refresh the thread after we bump
		// the local inbox version
		if err := storage.NewInbox(s.G()).IncrementLocalConvVersion(ctx, uid, convID); err != nil {
			s.Debug(ctx, "notifyEphemeralPurge: unablle to IncrementLocalConvVersion, err", err)
		}
		s.G().ActivityNotifier.ThreadsStale(ctx, uid, []chat1.ConversationStaleUpdate{
			chat1.ConversationStaleUpdate{
				ConvID:     convID,
				UpdateType: chat1.StaleUpdateType_CONVUPDATE,
			},
		})
		s.notifyUpdated(ctx, uid, convID, s.storage.GetExplodedReplies(ctx, convID, uid, explodedMsgs))
	}
}