code: func RunServer(srv *http.Server, shutdownFuncs ...func()) {
  	done := make(chan struct{})
  
  	go func() {
  		// Handle SIGINT and SIGTERM.
  		sigCh := make(chan os.Signal, 1)
  		signal.Notify(sigCh, syscall.SIGINT, syscall.SIGTERM)
  
  		sig := <-sigCh
  		fmt.Println("Received signal, stopping.", "signal", sig)
  
  		ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second)
  		defer cancel()
  
  		// We received an interrupt signal, shut down.
  		if err := srv.Shutdown(ctx); err != nil {
  			// Error from closing listeners, or context timeout:
  			fmt.Printf("HTTP server Shutdown: %v\n", err)
  		}
  		// Run shutdown functions
  		for _, sf := range shutdownFuncs {
  			sf()
  		}
  
  		close(done)
  	}()
  
  	fmt.Printf("HTTP server listening on address: \"%s\"\n", srv.Addr)
  	if err := srv.ListenAndServe(); err != http.ErrServerClosed {
  		// Error starting or closing listener:
  		fmt.Printf("HTTP server ListenAndServe: %v\n", err)
  		os.Exit(1)
  	}
  
  	<-done
  }
docs: // RunServer handles the biolerplate of starting an http server and handling
  // signals gracefully.