tedsmitt / ecsgo

Provides an interactive prompt to connect to ECS Containers using the ECS ExecuteCommand API.
Apache License 2.0
81 stars 13 forks source link

Use simple comparision instead of Contains / fix #20 #22

Closed yerfinojul closed 1 year ago

yerfinojul commented 1 year ago

When using strings.Contains our flow breaks when selecting the container - see issue https://github.com/tedsmitt/ecsgo/issues/20 The problem is we have 2 containers that are named like this

I pick up the first sample-ui, but it ends up ssh into sample-ui-logger, because .Contains function will match both in that case.

Please check it out, not sure there is a specific reason for using .Contains

tedsmitt commented 1 year ago

Thanks @yerfinojul! I don't think there is a reason why string.Contains - probably just poor coding on my part! Have tested the changes locally and LGTM! Merged 😄