diff options
| author | Eugene Triguba <eugenetriguba@gmail.com> | 2024-01-28 16:10:14 -0500 |
|---|---|---|
| committer | Eugene Triguba <eugenetriguba@gmail.com> | 2024-01-28 16:10:14 -0500 |
| commit | b06eba3df09a8fcd777b8fe350c2b184758963d1 (patch) | |
| tree | 0a2ad3aa9537c0457688b7325a3858c1b328bea2 /vendor/gotest.tools/v3/internal/format/format.go | |
| parent | Add version cmd to docs (diff) | |
| download | cli-b06eba3df09a8fcd777b8fe350c2b184758963d1.zip | |
Use checkmate for tests
Diffstat (limited to 'vendor/gotest.tools/v3/internal/format/format.go')
| -rw-r--r-- | vendor/gotest.tools/v3/internal/format/format.go | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/vendor/gotest.tools/v3/internal/format/format.go b/vendor/gotest.tools/v3/internal/format/format.go deleted file mode 100644 index 5097e4b..0000000 --- a/vendor/gotest.tools/v3/internal/format/format.go +++ /dev/null @@ -1,27 +0,0 @@ -package format // import "gotest.tools/v3/internal/format" - -import "fmt" - -// Message accepts a msgAndArgs varargs and formats it using fmt.Sprintf -func Message(msgAndArgs ...interface{}) string { - switch len(msgAndArgs) { - case 0: - return "" - case 1: - return fmt.Sprintf("%v", msgAndArgs[0]) - default: - return fmt.Sprintf(msgAndArgs[0].(string), msgAndArgs[1:]...) - } -} - -// WithCustomMessage accepts one or two messages and formats them appropriately -func WithCustomMessage(source string, msgAndArgs ...interface{}) string { - custom := Message(msgAndArgs...) - switch { - case custom == "": - return source - case source == "": - return custom - } - return fmt.Sprintf("%s: %s", source, custom) -} |