Skip to content

Commit 4e507b1

Browse files
committed
add sort
Signed-off-by: cuisongliu <cuisongliu@qq.com>
1 parent ebc3676 commit 4e507b1

File tree

6 files changed

+5314
-1
lines changed

6 files changed

+5314
-1
lines changed

generator/default.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,10 @@ func Do() {
5858
logger.Info("get docker hub all repo success")
5959
goRunData := make(map[markdown.Type][]types.ImageInfo)
6060
if got != nil {
61+
types.SortByImageInfo(got.Rootfs)
62+
types.SortByImageInfo(got.Sealos)
63+
types.SortByImageInfo(got.Laf)
64+
types.SortByImageInfo(got.Apps)
6165
goRunData[markdown.Rootfs] = got.Rootfs
6266
goRunData[markdown.Sealos] = got.Sealos
6367
goRunData[markdown.Laf] = got.Laf

generator/default_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import (
2222
)
2323

2424
func TestDo(t *testing.T) {
25-
os.Setenv("SYNC_DIR", "docs/docker")
25+
os.Setenv("SYNC_DIR", "../tmp")
2626
os.Setenv("SYNC_HUB", "docker.io/labring")
2727
Do()
2828
os.Unsetenv("SYNC_DIR")

0 commit comments

Comments
 (0)