gcs: Fetch port as GlobalString(). (#4657)

Currently we were looking for `address` flag
under local flags. This PR fixes #4656
master
Harshavardhana 7 years ago committed by Krishna Srinivas
parent ce7af3aae1
commit 2d23cd4f39
  1. 6
      cmd/gateway-main.go

@ -250,7 +250,7 @@ func azureGatewayMain(ctx *cli.Context) {
} }
// Validate gateway arguments. // Validate gateway arguments.
fatalIf(validateGatewayArguments(ctx.String("address"), ctx.Args().First()), "Invalid argument") fatalIf(validateGatewayArguments(ctx.GlobalString("address"), ctx.Args().First()), "Invalid argument")
gatewayMain(ctx, azureBackend) gatewayMain(ctx, azureBackend)
} }
@ -262,7 +262,7 @@ func s3GatewayMain(ctx *cli.Context) {
} }
// Validate gateway arguments. // Validate gateway arguments.
fatalIf(validateGatewayArguments(ctx.String("address"), ctx.Args().First()), "Invalid argument") fatalIf(validateGatewayArguments(ctx.GlobalString("address"), ctx.Args().First()), "Invalid argument")
gatewayMain(ctx, s3Backend) gatewayMain(ctx, s3Backend)
} }
@ -359,7 +359,7 @@ func gatewayMain(ctx *cli.Context, backendType gatewayBackend) {
} }
apiServer := NewServerMux(ctx.String("address"), registerHandlers(router, handlerFns...)) apiServer := NewServerMux(ctx.GlobalString("address"), registerHandlers(router, handlerFns...))
// Start server, automatically configures TLS if certs are available. // Start server, automatically configures TLS if certs are available.
go func() { go func() {

Loading…
Cancel
Save