CallbackPath returns the full file path to a callback script
(name string)
| 194 | |
| 195 | // CallbackPath returns the full file path to a callback script |
| 196 | func (p Plugin) CallbackPath(name string) (string, error) { |
| 197 | path := filepath.Join(p.Dir, "bin", name) |
| 198 | _, err := os.Stat(path) |
| 199 | if errors.Is(err, os.ErrNotExist) { |
| 200 | return "", NoCallbackError{callback: name, plugin: p.Name} |
| 201 | } |
| 202 | |
| 203 | return path, nil |
| 204 | } |
| 205 | |
| 206 | // ShimTemplatePath returns the full file path to a shim, if it exists |
| 207 | func (p Plugin) ShimTemplatePath(shimName string) (string, error) { |
no outgoing calls