mirror of
https://github.com/mudler/luet.git
synced 2025-09-25 06:24:46 +00:00
🎨 Port package to types
This refactors DefaultPackage into types.Package and gets rid of the interface. This is a preceeding for a follow up where accessors will be removed from the code. It also does several cleanup, so we get rid also of some unneeded dependencies.
This commit is contained in:
@@ -5,7 +5,7 @@ import (
|
||||
"strconv"
|
||||
"time"
|
||||
|
||||
pkg "github.com/mudler/luet/pkg/package"
|
||||
"github.com/mudler/luet/pkg/api/core/types"
|
||||
)
|
||||
|
||||
const charset = "abcdefghijklmnopqrstuvwxyz" +
|
||||
@@ -26,6 +26,6 @@ func String(length int) string {
|
||||
return StringWithCharset(length, charset)
|
||||
}
|
||||
|
||||
func RandomPackage() pkg.Package {
|
||||
return pkg.NewPackage(String(5), strconv.Itoa(rand.Intn(100)), []*pkg.DefaultPackage{}, []*pkg.DefaultPackage{})
|
||||
func RandomPackage() *types.Package {
|
||||
return types.NewPackage(String(5), strconv.Itoa(rand.Intn(100)), []*types.Package{}, []*types.Package{})
|
||||
}
|
||||
|
Reference in New Issue
Block a user