mirror of
https://github.com/OliveTin/OliveTin
synced 2025-12-12 17:15:37 +00:00
22 lines
352 B
Go
22 lines
352 B
Go
package config
|
|
|
|
func (cfg *Config) FindAction(actionTitle string) *Action {
|
|
for _, action := range cfg.Actions {
|
|
if action.Title == actionTitle {
|
|
return &action
|
|
}
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
func (action *Action) FindArg(name string) *ActionArgument {
|
|
for _, arg := range action.Arguments {
|
|
if arg.Name == name {
|
|
return &arg
|
|
}
|
|
}
|
|
|
|
return nil
|
|
}
|