repolist/new.go

30 lines
580 B
Go
Raw Normal View History

2024-02-17 08:39:55 -06:00
package repolist
import (
"go.wit.com/log"
)
2024-02-17 14:22:24 -06:00
func RemoveFirstElement(slice []string) (string, []string) {
if len(slice) == 0 {
return "", slice // Return the original slice if it's empty
2024-02-17 08:39:55 -06:00
}
2024-02-17 14:22:24 -06:00
return slice[0], slice[1:] // Return the slice without the first element
}
2024-02-17 08:39:55 -06:00
2024-02-17 14:22:24 -06:00
func RepoType() {
for _, repo := range me.allrepos {
2024-02-17 15:48:56 -06:00
switch repo.Status.RepoType() {
2024-02-17 14:22:24 -06:00
case "binary":
//log.Info("compile here. Show()")
repo.Show()
case "library":
//log.Info("library here. Hide()")
repo.Hide()
default:
log.Info("showApps() unknown. Show()")
repo.Hide()
}
2024-02-17 08:39:55 -06:00
2024-02-17 14:22:24 -06:00
}
}