Updates comment for SetAction

This commit is contained in:
sloumdrone 2019-07-03 14:57:32 -07:00
parent f95b2b5f84
commit 8d07bea719
1 changed files with 6 additions and 0 deletions

View File

@ -123,6 +123,12 @@ func (e Entry) Execute(path string) error {
return nil
}
// Sets the action (key) for the entry calling it. This action
// is used when calling execute. The action is generally set by the
// Mailcap receiver FindMatch and SetAction is provided in order
// to easily manipulate an Entry found in the db directly. This
// is not recommended, but is provided as a lower level way of
// using the lib.
func (e Entry) SetAction(action string) error {
if _, ok := e[action]; !ok {
return fmt.Errorf("This entry does not have the action %q available", action)