Updates comment language for Execute

This commit is contained in:
sloumdrone 2019-07-04 16:17:22 -07:00
parent af14a9f84f
commit 91016d06fc
1 changed files with 6 additions and 7 deletions

View File

@ -86,13 +86,12 @@ func (m *Mailcap) FindMatch(mime, key string, needsTerm bool) (Entry, error) {
return make(Entry), fmt.Errorf("Unable to find key %q in entries for %s", key, mime)
}
// Called on an Entry type returned by FindMatch
// Executes the program associated with the key
// used to call Execute. A filepath string is
// also included in the call to Execute in order
// to declare the target of the program being
// called via the key param. Returns an error
// or nil.
// Called on an Entry type returned by FindMatch. Executes the
// program associated with the Entry. Calls the action that was
// set by FindMatch when generating the entry. If not action is
// set, SetAction will need to be called. A filepath string is
// passed to Execute in order to declare the target of the program
// being called. Returns an error or nil.
func (e Entry) Execute(path string) error {
key, ok := e["action"]
if !ok {