//When adds a function to the action stack with the action as the second arg
496790
func (a *ActDepend) When(fx func(b interface{}, a ActionInterface)) ActionInterface {
	return a.current().When(fx)
}
378362
func When(cond bool, m interface{}) Composer {
	return &condComposer{cond: cond, msg: ConvertToComposer(level.Priority(0), m)}
}
564946
func helpAction(exitCode int) func(*Command, []string) {
	return func(cmd *Command, args []string) {
		cmd.Usage()
		os.Exit(exitCode)
	}
}
778540
func NewActionStackFrom(a ActionStackInterface, mod ActionMod) *ActionStack {
	d, e := mod(a)
	return &ActionStack{
		d,
		e,
	}
}
499700
func (r *Resource) WithAction(action string) *Resource {
	r.u.RawQuery = url.Values{
		"~action": []string{action},
	}.Encode()
	return r
}
176174
func (f *Flow) add(action action) {
	f.actions = append(f.actions, action)
}
1023081
func (f *FlagClause) Action(action Action) *FlagClause {
	f.addAction(action)
	return f
}
1133165
func (a *ActionWrap) WhenOnly(fx func(b interface{})) ActionInterface {
	return a.action.WhenOnly(fx)
}
944960
func (b *Bucket) AddAction(act Action) {
	b.Actions = append(b.Actions, act)
}
1001362
func (a *ActDepend) Use(ind int) ActionInterface {
	return a.getIndex(ind).Wrap()
}
1190206
func (mod *MumbleBee) Action(action bees.Action) []bees.Placeholder {
	outs := []bees.Placeholder{}

	switch action.Name {
	case "send_to_user":

		user, text := "", ""

		action.Options.Bind("user", &user)
		action.Options.Bind("text", &text)

		mod.client.Users.Find(user).Send(text)

	case "send_to_channel":

		channel, text := "", ""

		action.Options.Bind("channel", &channel)
		action.Options.Bind("text", &text)

		if channel != "" {
			mod.client.Channels.Find(channel).Send(text, false)
		} else {
			mod.client.Self.Channel.Send(text, false)
		}
	case "move":

		channel := ""

		action.Options.Bind("channel", &channel)
		mod.move(channel)

	default:
		panic("Unknown action triggered in " + mod.Name() + ": " + action.Name)
	}

	return outs
}
1007858
func (r User_Permission_Group) AddAction(action *datatypes.User_Permission_Action) (err error) {
	var resp datatypes.Void
	params := []interface{}{
		action,
	}
	err = r.Session.DoRequest("SoftLayer_User_Permission_Group", "addAction", params, &r.Options, &resp)
	return
}
278762
func (a *ActionWrap) Then(fx func(b interface{}, a ActionInterface)) ActionInterface {
	return a.action.Then(fx)
}
594557
func (c *Choice) When(e HeaderFnc) *Choice {
	if c.pipe.err != nil {
		return c
	}
	obj, _ := e(c.pipe)
	c.execute = false
	c.execute = obj.(bool)
	return c
}
948179
func Whenln(cond bool, args ...interface{}) Composer {
	return &condComposer{cond: cond, msg: NewLine(args...)}
}
727233
func (kf *KeyspaceFixer) Action(ctx context.Context, name string) error {
	if name == "Create" {
		return kf.ts.CreateKeyspace(ctx, kf.keyspace, &topodatapb.Keyspace{})
	}
	if name == "Delete" {
		return kf.ts.DeleteKeyspace(ctx, kf.keyspace)
	}
	return fmt.Errorf("unknown KeyspaceFixer action: %v", name)
}
656294
func Whenf(cond bool, m string, args ...interface{}) Composer {
	return &condComposer{cond: cond, msg: NewFormatted(m, args...)}
}