Skip to content

Commit 124db39

Browse files
committed
Rabbit
1 parent db2c708 commit 124db39

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

internal/config/containers.go

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,6 @@ var emulatorHealthPaths = map[EmulatorType]string{
3131
EmulatorAWS: "/_localstack/health",
3232
}
3333

34-
var emulatorContainerPorts = map[EmulatorType]string{
35-
EmulatorAWS: "4566/tcp",
36-
}
37-
3834
type ContainerConfig struct {
3935
Type EmulatorType `mapstructure:"type"`
4036
Tag string `mapstructure:"tag"`
@@ -89,11 +85,12 @@ func (c *ContainerConfig) HealthPath() (string, error) {
8985
}
9086

9187
func (c *ContainerConfig) ContainerPort() (string, error) {
92-
port, ok := emulatorContainerPorts[c.Type]
93-
if !ok {
88+
switch c.Type {
89+
case EmulatorAWS:
90+
return "4566/tcp", nil
91+
default:
9492
return "", fmt.Errorf("%s emulator not supported yet by lstk", c.Type)
9593
}
96-
return port, nil
9794
}
9895

9996
func (c *ContainerConfig) DisplayName() string {

0 commit comments

Comments
 (0)