mirror of https://github.com/knative/func.git
fix: update console output to show both host and port using net.JoinHostPort
Signed-off-by: RayyanSeliya <rayyanseliya786@gmail.com>
This commit is contained in:
parent
d04ff0a378
commit
b77a031a5a
|
@ -5,6 +5,7 @@ import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
"net"
|
||||||
"os"
|
"os"
|
||||||
"strconv"
|
"strconv"
|
||||||
"time"
|
"time"
|
||||||
|
@ -282,7 +283,7 @@ func runRun(cmd *cobra.Command, newClient ClientFactory) (err error) {
|
||||||
}
|
}
|
||||||
fmt.Fprintln(cmd.OutOrStdout(), string(jsonData))
|
fmt.Fprintln(cmd.OutOrStdout(), string(jsonData))
|
||||||
} else {
|
} else {
|
||||||
fmt.Fprintf(cmd.OutOrStderr(), "Running on host port %v\n", job.Port)
|
fmt.Fprintf(cmd.OutOrStderr(), "Function running on %s\n", net.JoinHostPort(job.Host, job.Port))
|
||||||
}
|
}
|
||||||
|
|
||||||
select {
|
select {
|
||||||
|
|
Loading…
Reference in New Issue