Skip to content
This repository has been archived by the owner on Dec 12, 2024. It is now read-only.

[Chore] Add swag fmt to mage spec #198

Closed
wants to merge 17 commits into from
Closed
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion magefile.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,11 @@ func CITest() error {
// Spec generates an OpenAPI spec yaml based on code annotations.
func Spec() error {
swagCommand := "swag"
if err := installIfNotPresent(swagCommand, "github.com/swaggo/swag/cmd/swag@latest"); err != nil {
if err := installIfNotPresent(swagCommand, "github.com/swaggo/swag/cmd/[email protected]"); err != nil {
logrus.Fatal(err)
return err
}
if err := sh.Run(swagCommand, "fmt", "-d", "pkg/server/router"); err != nil {
logrus.Fatal(err)
return err
}
Expand Down