+
Skip to content

Conversation

saswatamcode
Copy link
Collaborator

This ports the Contains method from Thanos testutil package.

Signed-off-by: Saswata Mukherjee <saswataminsta@yahoo.com>
Copy link
Contributor

@bwplotka bwplotka left a comment

Choose a reason for hiding this comment

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

Thanks!

Some comment, WDYT?


// Contains fails the test if needle is not contained within haystack, if haystack or needle is
// an empty slice, or if needle is longer than haystack.
func Contains(tb testing.TB, haystack, needle []string) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't this be.... generic? ;p

Copy link
Contributor

Choose a reason for hiding this comment

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

Otherwise, let's use ContainsStringSlice function name?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

You're right! Something generic would suit here. Let me try to tackle that in next PR. Changing name for now! 🙂

Signed-off-by: Saswata Mukherjee <saswataminsta@yahoo.com>
Copy link
Contributor

@bwplotka bwplotka left a comment

Choose a reason for hiding this comment

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

Thanks!

@bwplotka bwplotka merged commit ba593f6 into efficientgo:main Dec 1, 2022
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

点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载