2 Commits
v1.0 ... hexa

Author SHA1 Message Date
Simon
2d72ff3402 Micro optimization pt. 2 2018-11-05 17:38:33 -05:00
Simon
1b5e6bb7f4 Micro optimization 2018-11-05 17:08:54 -05:00

View File

@@ -3,7 +3,6 @@ package main
import ( import (
"github.com/sirupsen/logrus" "github.com/sirupsen/logrus"
"math" "math"
"strings"
"sync" "sync"
"sync/atomic" "sync/atomic"
"time" "time"
@@ -67,7 +66,7 @@ func (w WorkerContext) step(job Job) {
} }
func DoJob(job *Job, f *File) (newJobs []Job, err error) { func DoJob(job *Job, f *File) (newJobs []Job, err error) {
if strings.HasSuffix(job.Uri.Path, "/") { if len(job.Uri.Path) != 0 && job.Uri.Path[len(job.Uri.Path)-1] == '/' {
// Load directory // Load directory
links, err := GetDir(job, f) links, err := GetDir(job, f)
if err != nil { if err != nil {