http urls monitor.

main.go 779B

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/tcp"
  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 skeleton for all project from links123.com
  10. // @version 1.0
  11. // @description project skeleton for all project from links123.com
  12. // @host 127.0.0.1:8080/v1
  13. func main() {
  14. rootCmd := &cobra.Command{
  15. Use: "skeleton",
  16. Short: "skeleton api for the project of links123.com's campus",
  17. }
  18. rootCmd.AddCommand(http.RunCommand())
  19. rootCmd.AddCommand(tcp.RunCommand())
  20. rootCmd.AddCommand(version.RunCommand(apiVersion, gitCommit, built))
  21. if err := rootCmd.Execute(); err != nil {
  22. panic(err)
  23. }
  24. }