Browse Source

fix indentation

master
Nicolas Massé 8 years ago
parent
commit
74e7b315b9
  1. 10
      src/itix.fr/forward/main.go

10
src/itix.fr/forward/main.go

@ -75,7 +75,7 @@ func SetupReverseProxy(local_port int, target string) {
fmt.Printf("Listening on port %v for incoming requests...\n", local_port)
err = http.ListenAndServe(fmt.Sprintf(":%v", local_port), handler)
if (err != nil) {
if err != nil {
fmt.Println("ERROR: %s", err)
}
}
@ -85,13 +85,13 @@ func main() {
backend_endpoint := os.Getenv("BACKEND_ENDPOINT_OVERRIDE")
portal_port_opt := os.Getenv("PORTAL_LISTEN_PORT")
if (portal_port_opt == "") {
if portal_port_opt == "" {
portal_port_opt = "9090"
fmt.Println("WARNING: No PORTAL_LISTEN_PORT environment variable found, defaulting to '9090'...")
}
backend_port_opt := os.Getenv("BACKEND_LISTEN_PORT")
if (backend_port_opt == "") {
if backend_port_opt == "" {
backend_port_opt = "9091"
fmt.Println("WARNING: No BACKEND_LISTEN_PORT environment variable found, defaulting to '9091'...")
}
@ -106,12 +106,12 @@ func main() {
error = true
}
portal_port, err := strconv.Atoi(portal_port_opt)
if (err != nil) {
if err != nil {
fmt.Printf("ERROR: Cannot parse the PORTAL_LISTEN_PORT environment variable (%s): %s\n", portal_port_opt, err)
error = true
}
backend_port, err := strconv.Atoi(backend_port_opt)
if (err != nil) {
if err != nil {
fmt.Printf("ERROR: Cannot parse the BACKEND_LISTEN_PORT environment variable (%s): %s\n", backend_port_opt, err)
error = true
}

Loading…
Cancel
Save