http urls monitor.

main.go 811B

123456789101112131415161718192021222324252627282930
  1. package main
  2. import (
  3. "git.links123.net/links123.com/monitor_status/cmd/http"
  4. "git.links123.net/links123.com/monitor_status/cmd/monitor"
  5. "git.links123.net/links123.com/monitor_status/cmd/version"
  6. "github.com/spf13/cobra"
  7. )
  8. var apiVersion, gitCommit, built string
  9. // @title project monitor_status for all project from links123.com
  10. // @version 1.0
  11. // @description project monitor_status for all project from links123.com
  12. // @host 127.0.0.1:8080/v1
  13. func main() {
  14. rootCmd := &cobra.Command{
  15. Use: "monitor_status",
  16. Short: "monitor_status api for the project of links123.com's campus",
  17. }
  18. rootCmd.AddCommand(http.RunCommand())
  19. rootCmd.AddCommand(monitor.RunCommand())
  20. rootCmd.AddCommand(version.RunCommand(apiVersion, gitCommit, built))
  21. if err := rootCmd.Execute(); err != nil {
  22. panic(err)
  23. }
  24. }