Skip to content

Commit

Permalink
add sort
Browse files Browse the repository at this point in the history
Signed-off-by: cuisongliu <[email protected]>
  • Loading branch information
cuisongliu committed Aug 26, 2023
1 parent ebc3676 commit 4e507b1
Show file tree
Hide file tree
Showing 6 changed files with 5,314 additions and 1 deletion.
4 changes: 4 additions & 0 deletions generator/default.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ func Do() {
logger.Info("get docker hub all repo success")
goRunData := make(map[markdown.Type][]types.ImageInfo)
if got != nil {
types.SortByImageInfo(got.Rootfs)
types.SortByImageInfo(got.Sealos)
types.SortByImageInfo(got.Laf)
types.SortByImageInfo(got.Apps)
goRunData[markdown.Rootfs] = got.Rootfs
goRunData[markdown.Sealos] = got.Sealos
goRunData[markdown.Laf] = got.Laf
Expand Down
2 changes: 1 addition & 1 deletion generator/default_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import (
)

func TestDo(t *testing.T) {
os.Setenv("SYNC_DIR", "docs/docker")
os.Setenv("SYNC_DIR", "../tmp")
os.Setenv("SYNC_HUB", "docker.io/labring")
Do()
os.Unsetenv("SYNC_DIR")
Expand Down
Loading

0 comments on commit 4e507b1

Please sign in to comment.