loic-go/cmd/status.go

26 lines
485 B
Go
Raw Normal View History

2025-03-25 16:53:35 +00:00
package cmd
import (
"fmt"
"forgejo.edf-bootstrap.cx.fg1.ffm.osc.live/Daniel.Sy/loic-go/pkg/loic"
"github.com/spf13/cobra"
)
var statusCmd = &cobra.Command{
Use: "status",
Short: "Displays test status",
Long: "Display test status of the application",
Run: func(cmd *cobra.Command, args []string) {
if loic.IsTestRunning() {
fmt.Println("Status: running")
return
} else {
fmt.Println("Status: stopped")
}
},
}
func init() {
rootCmd.AddCommand(statusCmd)
}