mirror of
https://github.com/edgebox-iot/edgeboxctl.git
synced 2026-09-24 05:41:43 +02:00
Added various functions to edgeapps package, working GetEdgeApps func running as scheduled task
This commit is contained in:
@@ -18,7 +18,20 @@ func Exec(command string, args []string) string {
|
||||
if err != nil {
|
||||
log.Println(fmt.Sprint(err) + ": " + stderr.String())
|
||||
}
|
||||
|
||||
log.Println("Result: " + out.String())
|
||||
|
||||
return out.String()
|
||||
|
||||
}
|
||||
|
||||
// DeleteEmptySlices : Given a string array, delete empty entries.
|
||||
func DeleteEmptySlices(s []string) []string {
|
||||
var r []string
|
||||
for _, str := range s {
|
||||
if str != "" {
|
||||
r = append(r, str)
|
||||
}
|
||||
}
|
||||
return r
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user