Rename variable for conciseness

This commit is contained in:
Seednode 2024-02-11 10:30:10 -06:00
parent 3ef68aaa23
commit 09bb2def7e
2 changed files with 7 additions and 7 deletions

View File

@ -75,13 +75,13 @@ func (index *fileIndex) List() []string {
func (index *fileIndex) remove(path string) {
index.mutex.RLock()
tempIndex := make([]string, len(index.list))
copy(tempIndex, index.list)
t := make([]string, len(index.list))
copy(t, index.list)
index.mutex.RUnlock()
var position int
for k, v := range tempIndex {
for k, v := range t {
if path == v {
position = k
@ -89,11 +89,11 @@ func (index *fileIndex) remove(path string) {
}
}
tempIndex[position] = tempIndex[len(tempIndex)-1]
t[position] = t[len(t)-1]
index.mutex.Lock()
index.list = make([]string, len(tempIndex)-1)
copy(index.list, tempIndex[:len(tempIndex)-1])
index.list = make([]string, len(t)-1)
copy(index.list, t[:len(t)-1])
index.mutex.Unlock()
}

View File

@ -17,7 +17,7 @@ import (
const (
AllowedCharacters string = `^[A-z0-9.\-_]+$`
ReleaseVersion string = "8.7.2"
ReleaseVersion string = "8.7.3"
)
var (