Compare commits
No commits in common. "3fd2bf6bb3afb45250de530351029d13be330ec5" and "3ef68aaa23ebbe183ab6fdb348642a853b26e1e3" have entirely different histories.
3fd2bf6bb3
...
3ef68aaa23
|
@ -23,10 +23,18 @@ func (filters *filters) hasIncludes() bool {
|
|||
return len(filters.included) != 0 && Filtering
|
||||
}
|
||||
|
||||
func (filters *filters) includes() string {
|
||||
return strings.Join(filters.included, ",")
|
||||
}
|
||||
|
||||
func (filters *filters) hasExcludes() bool {
|
||||
return len(filters.excluded) != 0 && Filtering
|
||||
}
|
||||
|
||||
func (filters *filters) excludes() string {
|
||||
return strings.Join(filters.excluded, ",")
|
||||
}
|
||||
|
||||
func (filters *filters) apply(fileList []string) []string {
|
||||
result := make([]string, len(fileList))
|
||||
|
||||
|
|
12
cmd/index.go
12
cmd/index.go
|
@ -75,13 +75,13 @@ func (index *fileIndex) List() []string {
|
|||
|
||||
func (index *fileIndex) remove(path string) {
|
||||
index.mutex.RLock()
|
||||
t := make([]string, len(index.list))
|
||||
copy(t, index.list)
|
||||
tempIndex := make([]string, len(index.list))
|
||||
copy(tempIndex, index.list)
|
||||
index.mutex.RUnlock()
|
||||
|
||||
var position int
|
||||
|
||||
for k, v := range t {
|
||||
for k, v := range tempIndex {
|
||||
if path == v {
|
||||
position = k
|
||||
|
||||
|
@ -89,11 +89,11 @@ func (index *fileIndex) remove(path string) {
|
|||
}
|
||||
}
|
||||
|
||||
t[position] = t[len(t)-1]
|
||||
tempIndex[position] = tempIndex[len(tempIndex)-1]
|
||||
|
||||
index.mutex.Lock()
|
||||
index.list = make([]string, len(t)-1)
|
||||
copy(index.list, t[:len(t)-1])
|
||||
index.list = make([]string, len(tempIndex)-1)
|
||||
copy(index.list, tempIndex[:len(tempIndex)-1])
|
||||
index.mutex.Unlock()
|
||||
}
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ import (
|
|||
|
||||
const (
|
||||
AllowedCharacters string = `^[A-z0-9.\-_]+$`
|
||||
ReleaseVersion string = "8.7.4"
|
||||
ReleaseVersion string = "8.7.2"
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
|
@ -47,12 +47,12 @@ func generateQueryParams(filters *filters, sortOrder, refreshInterval string) st
|
|||
if Filtering {
|
||||
queryParams.WriteString("include=")
|
||||
if filters.hasIncludes() {
|
||||
queryParams.WriteString(strings.Join(filters.included, ","))
|
||||
queryParams.WriteString(filters.includes())
|
||||
}
|
||||
|
||||
queryParams.WriteString("&exclude=")
|
||||
if filters.hasExcludes() {
|
||||
queryParams.WriteString(strings.Join(filters.excluded, ","))
|
||||
queryParams.WriteString(filters.excludes())
|
||||
}
|
||||
|
||||
hasParams = true
|
||||
|
|
Loading…
Reference in New Issue