21 lines
400 B
Go
21 lines
400 B
Go
package handlers_packages
|
|
|
|
import (
|
|
"brunel/domain"
|
|
"brunel/packages"
|
|
|
|
"github.com/gofiber/fiber/v2"
|
|
)
|
|
|
|
func I386(c *fiber.Ctx) error {
|
|
pkgs := packages.GetPackages()
|
|
i386Pkgs := make([]domain.SourcePackage, 0)
|
|
pkgs.ForEach(func(k string, v domain.SourcePackage) bool {
|
|
if v.Has32bit {
|
|
i386Pkgs = append(i386Pkgs, v)
|
|
}
|
|
return true
|
|
})
|
|
return c.Status(fiber.StatusOK).JSON(i386Pkgs)
|
|
}
|