new: new caplets module to manage system caplets

This commit is contained in:
evilsocket 2018-09-21 16:49:20 +02:00
commit e79ba4952e
6 changed files with 213 additions and 3 deletions

View file

@ -5,6 +5,7 @@ import (
"fmt"
"os"
"path/filepath"
"sort"
"strings"
"sync"
@ -38,6 +39,10 @@ func List() []Caplet {
}
}
sort.Slice(caplets, func(i, j int) bool {
return strings.Compare(caplets[i].Name, caplets[j].Name) == -1
})
return caplets
}