mirror of
https://gitea.com/Lydanne/buildx.git
synced 2025-07-09 21:17:09 +08:00
Fix --driver flag usage markdown output
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
@ -129,8 +129,15 @@ func GetDriver(ctx context.Context, name string, f Factory, api dockerclient.API
|
||||
return &cachedDriver{Driver: d}, nil
|
||||
}
|
||||
|
||||
func GetFactories() map[string]Factory {
|
||||
return drivers
|
||||
func GetFactories() []Factory {
|
||||
ds := make([]Factory, 0, len(drivers))
|
||||
for _, d := range drivers {
|
||||
ds = append(ds, d)
|
||||
}
|
||||
sort.Slice(ds, func(i, j int) bool {
|
||||
return ds[i].Name() < ds[j].Name()
|
||||
})
|
||||
return ds
|
||||
}
|
||||
|
||||
type cachedDriver struct {
|
||||
|
Reference in New Issue
Block a user