loic-go/cmd/status.go
2025-03-25 17:53:35 +01:00

25 lines
485 B
Go

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)
}