lazy code move from repolist
This commit is contained in:
parent
da5e5f6455
commit
c3c3901e9a
8
chomp.go
8
chomp.go
|
@ -88,3 +88,11 @@ func Chomp(a interface{}) string {
|
|||
handleError(fmt.Errorf(tmp), -1)
|
||||
return ""
|
||||
}
|
||||
|
||||
// this is stuff from a long time ago that there must be a replacement for
|
||||
func RemoveFirstElement(slice []string) (string, []string) {
|
||||
if len(slice) == 0 {
|
||||
return "", slice // Return the original slice if it's empty
|
||||
}
|
||||
return slice[0], slice[1:] // Return the slice without the first element
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue