2025-11-08 16:52:16 +00:00
|
|
|
package main
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"fmt"
|
|
|
|
|
"os"
|
|
|
|
|
|
|
|
|
|
"github.com/Snider/Mining/cmd/mining/cmd"
|
2025-11-09 01:02:31 +00:00
|
|
|
_ "github.com/Snider/Mining/docs"
|
2025-11-08 16:52:16 +00:00
|
|
|
)
|
|
|
|
|
|
2025-11-09 01:02:31 +00:00
|
|
|
// @title Mining API
|
|
|
|
|
// @version 1.0
|
|
|
|
|
// @description This is a sample server for a mining application.
|
|
|
|
|
// @host localhost:8080
|
|
|
|
|
// @BasePath /api/v1/mining
|
2025-11-08 16:52:16 +00:00
|
|
|
func main() {
|
2025-11-09 01:02:31 +00:00
|
|
|
// If no command is provided, default to "serve"
|
|
|
|
|
if len(os.Args) == 1 {
|
|
|
|
|
os.Args = append(os.Args, "serve")
|
|
|
|
|
}
|
|
|
|
|
|
2025-11-08 16:52:16 +00:00
|
|
|
if err := cmd.Execute(); err != nil {
|
|
|
|
|
fmt.Fprintf(os.Stderr, "Error: %v\n", err)
|
|
|
|
|
os.Exit(1)
|
|
|
|
|
}
|
|
|
|
|
}
|