Skip to content

s3: tidy up transport construction - #265

Open
bboreham wants to merge 1 commit into
thanos-io:mainfrom
bboreham:nicer-s3-transport
Open

s3: tidy up transport construction#265
bboreham wants to merge 1 commit into
thanos-io:mainfrom
bboreham:nicer-s3-transport

Conversation

@bboreham

Copy link
Copy Markdown
  • I added CHANGELOG entry for this change.
  • Change is not relevant to the end user.

Changes

Only build the default transport if none is set in config.
This is what the comment already said; it confused me that the code was doing extra work.

Verification

It's simple enough to eyeball. Hopefully there are tests.

Only build the default transport if none is set in config.

Signed-off-by: Bryan Boreham <bjboreham@gmail.com>

@JoaoBraveCoding JoaoBraveCoding left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Personally I tend to prefer the default & overwrite approach vs using else as it makes the code easier to read/maintain. From my POV I would rather see the comment change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants