aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/github.com/ettle/strcase/assert.go
diff options
context:
space:
mode:
authordependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>2024-03-04 17:40:11 +0000
committerTaras Madan <tarasmadan@google.com>2024-03-04 18:34:55 +0000
commit5fc5366972c874b919f93165bb4ed4e2bcb7c350 (patch)
tree287c3361a0dee0c72af80d9a1a66714a06e98a62 /vendor/github.com/ettle/strcase/assert.go
parent1be5ce38a9059c356eb193a8c34d60d61c9fc31f (diff)
mod: bump github.com/golangci/golangci-lint from 1.55.2 to 1.56.2
Bumps [github.com/golangci/golangci-lint](https://github.com/golangci/golangci-lint) from 1.55.2 to 1.56.2. - [Release notes](https://github.com/golangci/golangci-lint/releases) - [Changelog](https://github.com/golangci/golangci-lint/blob/master/CHANGELOG.md) - [Commits](https://github.com/golangci/golangci-lint/compare/v1.55.2...v1.56.2) --- updated-dependencies: - dependency-name: github.com/golangci/golangci-lint dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
Diffstat (limited to 'vendor/github.com/ettle/strcase/assert.go')
-rw-r--r--vendor/github.com/ettle/strcase/assert.go24
1 files changed, 24 insertions, 0 deletions
diff --git a/vendor/github.com/ettle/strcase/assert.go b/vendor/github.com/ettle/strcase/assert.go
new file mode 100644
index 000000000..09344e40f
--- /dev/null
+++ b/vendor/github.com/ettle/strcase/assert.go
@@ -0,0 +1,24 @@
+package strcase
+
+// We use a lightweight replacement for testify/assert to reduce dependencies
+
+// testingT interface allows us to test our assert functions
+type testingT interface {
+ Logf(format string, args ...interface{})
+ Fail()
+}
+
+// assertTrue will fail if the value is not true
+func assertTrue(t testingT, value bool) {
+ if !value {
+ t.Fail()
+ }
+}
+
+// assertEqual will fail if the two strings are not equal
+func assertEqual(t testingT, expected, actual string) {
+ if expected != actual {
+ t.Logf("Expected: %s Actual: %s", expected, actual)
+ t.Fail()
+ }
+}