Better naming

dev
Manuel Bua 2020-07-19 14:24:43 +02:00
parent 0983e8b9fa
commit 838f844837
1 changed files with 2 additions and 2 deletions

View File

@ -96,7 +96,7 @@ func isFilePath(path string) (bool, error) {
return info.Mode().IsRegular(), nil return info.Mode().IsRegular(), nil
} }
func (r *Runner) translateToAbsolutePath(path string) (string, error) { func (r *Runner) resolvePathIfRelative(path string) (string, error) {
if r.isRelative(path) { if r.isRelative(path) {
newPath, err := r.resolvePath(path) newPath, err := r.resolvePath(path)
if err != nil { if err != nil {
@ -125,7 +125,7 @@ func (r *Runner) RunEnumeration() {
// parses user input, handle file/directory cases and produce a list of unique templates // parses user input, handle file/directory cases and produce a list of unique templates
for _, t := range r.options.Templates { for _, t := range r.options.Templates {
// resolve and convert relative to absolute path // resolve and convert relative to absolute path
absPath, err := r.translateToAbsolutePath(t) absPath, err := r.resolvePathIfRelative(t)
if err != nil { if err != nil {
gologger.Errorf("Could not find template file '%s': %s\n", t, err) gologger.Errorf("Could not find template file '%s': %s\n", t, err)
continue continue