mirror of
https://github.com/cirruslabs/orchard.git
synced 2026-09-30 03:51:43 +02:00
@@ -19,6 +19,7 @@ import (
|
||||
"google.golang.org/grpc/keepalive"
|
||||
"net"
|
||||
"net/http"
|
||||
"strings"
|
||||
"time"
|
||||
)
|
||||
|
||||
@@ -158,3 +159,10 @@ func (controller *Controller) Run(ctx context.Context) error {
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (controller *Controller) Address() string {
|
||||
if strings.HasPrefix(controller.listenAddr, ":") {
|
||||
return fmt.Sprintf("http://localhost%s", controller.listenAddr)
|
||||
}
|
||||
return controller.listenAddr
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user