An Yggdrasil address miner in Go
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
382 B

  1. // +build debug
  2. package main
  3. import (
  4. "log"
  5. "net/http"
  6. _ "net/http/pprof"
  7. "os"
  8. )
  9. func init() {
  10. listen := os.Getenv("SYGGO_HTTP")
  11. if listen == "" {
  12. listen = "[::]:8082"
  13. }
  14. log.Printf("profiling is enabled, HTTP server is attached to %s\n", listen)
  15. go func() {
  16. if err := http.ListenAndServe(listen, nil); err != nil {
  17. log.Fatalf("http failed: %v\n", err)
  18. }
  19. }()
  20. }